<div dir="ltr"><div>Chris, thanks for the quick reply.  You are correct, a private macports installation would enable testing ports without special privilege.  Actually I have already done this many times for testing and debugging other cases.</div><div><br></div><div>However, I would like to find an intermediate solution that avoids full build-up from sources.  My main reasons are (1) test sensitivity to installed ports in the system prefix; (2) save time and effort; and (3) be able to provide compact, uncomplicated reproducers to third parties.</div><div><br></div><div>If not currently possible, it would be nice to have a new feature to enable local repository testing, with fallback to the system prefix for everything not found in the local repository.</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 17, 2020 at 3:09 PM Christopher Jones <<a href="mailto:jonesc@hep.phy.cam.ac.uk">jonesc@hep.phy.cam.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hi,<div><br></div><div>I might be wrong, but I do not believe it is possible to temporarily change the install prefix, for a single port.</div><div><br></div><div>Most probably you will need to start a new installation, using a custom installation prefix, from scratch. see</div><div><br></div><div><a href="https://www.macports.org/install.php#source" target="_blank">https://www.macports.org/install.php#source</a></div><div><br></div><div>on installing from source, which you will need to do to change the installation prefix, as its a configure time option.</div><div><br></div><div>Chris<br><div><br><blockquote type="cite"><div>On 17 Jan 2020, at 9:33 pm, Dave Allured - NOAA Affiliate via macports-users <<a href="mailto:macports-users@lists.macports.org" target="_blank">macports-users@lists.macports.org</a>> wrote:</div><br><div><div dir="ltr">I am on a corporate network with ports installed normally in /opt/local, controlled by system admins.  Users do not have any write access into system directories.  I would like to use a local portfile repository in user space, as described in Macports guide 4.6.<br><br>How can I test ports in the local repository?  The "portindex" command works as expected in this directory.  However, "port install" fails with "Insufficient privileges to write to MacPorts install prefix".  I need a way to tell "port install" to use a local prefix, rather than the default system prefix, for only the port under test.<br><br>I figured that I could avoid tampering with the protected sources.conf, by manually pre-staging the desired distfiles in the local repository.  Here is my embryonic directory structure:<br><br>$HOME/portx/science/netcdf-fortran/Portfile<br>$HOME/portx/science/netcdf-fortran/files/patch-Makefile.in.diff<br>$HOME/portx/var/macports/distfiles/netcdf-fortran/netcdf-fortran-4.5.2.tar.gz<br><br>Thank you for any advice.</div></div></blockquote></div></div></div></blockquote></div></div>