Test in local repository without privileges

Joshua Root jmr at macports.org
Mon Jan 20 06:27:01 UTC 2020

Dave Allured wrote:
> Is there an easy way to get macports to go through the motions of "port
> install -s" for a single port, using macports infrastructure, and taking
> port dependencies from /opt/local, but writing only inside a user
> directory?

You can't install or activate without write access to the registry,
which is under /opt/local. You can probably do everything before that,
up to the destroot phase, provided you have writable places to put the
distfile(s) and build the port. You might be able to do that by
overriding distpath and portbuildpath. Logging won't work without write
access, so you'll want to use -d to get all output on the terminal.

So your command would look like:

port -ds destroot someport distpath=/some/path portbuildpath=/other/path

But I think you'll still run into checks like this:

They can be commented out in the Tcl... if you have write access to

- Josh

More information about the macports-users mailing list