#69555 closed enhancement (fixed)
Use cloning to activate port images on APFS
Reported by: | jmroot (Joshua Root) | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 2.10.0 |
Component: | base | Version: | |
Keywords: | Cc: | ||
Port: |
Description
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.
Change History (7)
comment:1 follow-up: 2 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 8 months ago by jmroot (Joshua Root)
Replying to ryandesign:
The activated location could span multiple volumes.
We already behave suboptimally in that case, so no regression.
comment:3 Changed 5 months ago by jmroot (Joshua Root)
Owner: | set to jmroot |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:4 Changed 5 months ago by jmroot (Joshua Root)
Milestone: | → MacPorts Future |
---|
comment:5 Changed 4 months ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 2.10.0 |
---|
comment:6 follow-up: 7 Changed 3 months ago by barracuda156
I have an impression that image_to_archives
script freezes now. Has this been tested on 10.5, for example?
- S. It installs fine if there are no ports installed, but either takes hours or just does not work at all when many ports are installed, and MacPorts is been upgraded.
comment:7 Changed 3 months ago by jmroot (Joshua Root)
Replying to barracuda156:
Has this been tested on 10.5, for example?
Yes. If you want to report a bug, open a new ticket with steps to reproduce.
Replying to jmroot:
The activated location could span multiple volumes.