[MacPorts] #69555: Use cloning to activate port images on APFS

MacPorts noreply at macports.org
Thu Mar 21 05:28:49 UTC 2024


#69555: Use cloning to activate port images on APFS
-------------------------+--------------------
 Reporter:  jmroot       |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  base         |    Version:
 Keywords:               |       Port:
-------------------------+--------------------
 Background on why things are the way they currently are: #13143, #13601,
 #19458

 Our current way of handling port images predates APFS by many years. Some
 of the problems it was intended to solve may no longer be relevant on
 modern systems.

 Storing port images as extracted directories and using COPYFILE_CLONE to
 activate their files could improve performance a lot. Cloning rather than
 hard linking (as was done historically) would prevent changes to the
 activated files from affecting those in the image, because of the COW
 semantics. Hopefully Time Machine also handles APFS clones better than it
 historically handled hard links.

 Since a lot of installations are done from downloaded archives anyway, it
 probably makes sense to always create an intermediate archive when
 installing from a local destroot. This handily solves the hard link
 detection problem and is also one of the easiest ways of applying HFS
 compression. We could have an option to keep the archive as well if
 desired (such as on the buildbot).

 We would of course have to fall back to the current method on non-APFS
 filesystems, and when the image directory is on a different volume than
 the activated location.

-- 
Ticket URL: <https://trac.macports.org/ticket/69555>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list