Wouldn't it be better to make sure a MacPorts installation always stays within /opt/local?

Sean Mehta sean at mehta.io
Sun Feb 16 12:29:02 PST 2014


To make a parallel installation for testing, I compile from source with
something like:

	$ ./configure --prefix=$MP_PREFIX
		--with-applications-dir=$MP_PREFIX/Applications \
		--with-tclpackage=$MP_PREFIX/Library/Tcl
	$ make
	$ sudo make install

where $MP_PREFIX is the install location (like /opt/local.trunk).

And then make the change you suggest to startupitem_install. That seems
to keep everything within the specified $MP_PREFIX folder, I believe.
That doesn't mean that a rogue port couldn't install something outside
of $MP_PREFIX, but I've never noticed anything installed outside of
$MP_PREFIX with the ports I've installed.

On Sun, Feb 16, 2014, at 13:27, MK-MacPorts at techno.ms wrote:
> I just wanted to set up a 2nd parallel MacPorts install - as I used to
> have it before moving to Mavericks…
> 
> Now I realise that it is probably not a good idea to have a setup like
> that after all.
> 
> Some applications install themselves into /Applications and have settings
> in /Library…
> 
> Assuming I have two MP installs setup as
> 
> 	/opt/local
> and
> 	/opt/local.trunk
> 
> I would have to be very careful when renaming those in such a way that I
> could use the installation in /opt/local.trunk!!!
> 
> I thought about simply renaming /opt/local to /opt/local.default and then
> have /opt/local.trunk renamed as /opt/local, but this is highly dangerous
> given the high likelihood which which installed files might reside
> outside /opt/local...
> 
> So, I guess, such a setup is rather to be avoided?!
> 
> I could redefine applications_dir as
> ---
>  applications_dir        /opt/local/Applications/MacPorts
> ---
> but the question is how can I trust every port that nothing else would be
> installed outside /opt/local?
> 
> I looks like though that it should be enough to have startupitem_install
> set to “no” in order to avoid messing with
> /Library/Launch(Daemons|Agents).
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev


More information about the macports-dev mailing list