/opt/local on non-boot partition

Bradley Giesbrecht pixilla at macports.org
Sat Sep 28 16:08:28 PDT 2013


On Sep 28, 2013, at 3:55 PM, Eric Gallager wrote:

> Beware, though, that if you make /opt/local a symlink, you'll run into https://trac.macports.org/ticket/39850
> 
> 
> 
> On Sat, Sep 28, 2013 at 3:40 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
> 
> On Sep 28, 2013, at 10:11, Bradley Giesbrecht <pixilla at macports.org> wrote:
> 
> > Is there MP documentation of a supported method of having /opt on a non-boot partition?
> 
> 
> I don't think so… certainly you can install MacPorts on a non-default partition; you just compile from source and set --prefix=/Volumes/Whatever/opt/local for example. If you wanted to still be able to refer to it as /opt/local, you could make /opt/local a symlink to /Volumes/Whatever/opt/local and that should work in most cases.

The symlink was not working well for me.

I ended up doing this, with "MacPorts" as the partition name I had prepared:
$ diskutil list | grep MacPorts
   4:                  Apple_HFS MacPorts                499.2 GB   disk0s4
$ diskutil info /dev/disk0s4 | grep UUID
   Volume UUID:              D8F0DDCF-A195-3A41-8EA1-1EA7C86ED512
$ vifs
UUID=D8F0DDCF-A195-3A41-8EA1-1EA7C86ED512 /opt hfs rw,auto

Seems to be working across reboots.

I do end up with some OS X dot files in opt:
$ ls -a /opt/
.		..		.Spotlight-V100	.Trashes	.fseventsd	local


Regards,
Bradley Giesbrecht (pixilla)



More information about the macports-dev mailing list