Accessing a MacPorts tree from another [local] system

Daniel J. Luke dluke at geeklair.net
Sun Aug 11 21:27:46 UTC 2024


On Aug 11, 2024, at 4:15 PM, Sergey Fedorov <vital.had at gmail.com> wrote:
> 
> For testing purposes, I want to use an existing MacPorts installation with another local system (same major darwin version, different minor). Is there a way to do that besides actually copying the whole tree (or reproducing it via installing)?
> 
> Specifically, I want to try building a few specific ports, but I neither want to build everything from scratch (that will take days of compilation) nor ditto a multi-gigabyte tree (that is feasible but inconvenient).
> Simply symlinking /opt/local from a volume with MacPorts into /opt/local on a system of interest does not work correctly.\

https://trac.macports.org/wiki/howto/ShareArchives2 might help (you'll copy files over but won't have to build from scratch.

> Any alternatives which will actually work as intended? I.e. I want a clean system to use /opt/local from another volume.
> Or can I configure MacPorts on the system of interest to use a prefix pointing to ${another_local_volume}/opt/local?

Yon can build base from source and point macports point to a different directory.

I had a version of MacPorts working where /opt/local was a symlink some time ago (I had a local patch to fixup some of the problems, but I can't find it now). IIRC setting prefix in macports.conf made things mostly work.

-- 
Daniel J. Luke



More information about the macports-dev mailing list