[MacPorts] #67592: Prevent creation of CoreSimulator caches
MacPorts
noreply at macports.org
Thu Jun 8 04:16:25 UTC 2023
#67592: Prevent creation of CoreSimulator caches
-------------------------+-----------------------------
Reporter: ryandesign | Owner: (none)
Type: enhancement | Status: new
Priority: Normal | Milestone: MacPorts Future
Component: base | Version: 2.8.1
Keywords: | Port:
-------------------------+-----------------------------
With Xcode 12.2 or later (or possibly 12 or later, but definitely not with
11.x or earlier versions), something (presumably at least some instances
of running `xcodebuild`) causes CoreSimulator caches to be created in
Library/Developer/CoreSimulator/Caches (where this may be the Library
folder in the user's home directory or the root user's home directory or
the MacPorts home directory). These caches enable the simulator to run
non-macOS (iOS, iPadOS, tvOS, watchOS) software. As such, we have no use
for them in MacPorts. These caches are specific to the versions of the
non-macOS operating systems supported by the installed version of Xcode.
Upgrading Xcode causes new versions of the caches to eventually be created
while the previous ones are not automatically removed. These caches are
several GiB in size and multiple copies of the caches can get created, in
each of several Library folders. The presence of these large unneeded
files has been responsible for numerous instances of buildbot builds
failing due to lack of disk space. MacPorts base should prevent the
creation of these useless cache files.
I reported this problem to Apple in FB9072613 and they advised that the
creation of the cache files can be prevented by using:
{{{
defaults write com.apple.CoreSimulator DisableDyldSharedCache 1
}}}
I've done this on the buildbot workers and copied
$HOME/Library/Preferences/com.apple.CoreSimulator.plist to
/opt/local/var/macports/home/Library/Preferences and
/opt/bblocal/var/macports/home/Library/Preferences and will see if this
prevents the caches from being recreated during the use of MacPorts. If
not, MacPorts base may need to copy it to
${workpath}/.home/Library/Preferences like it already does for
com.apple.dt.Xcode.plist.
--
Ticket URL: <https://trac.macports.org/ticket/67592>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list