Installer should allow installation of macport in custom locations - for users without admin access

Jordan K. Hubbard jkh at apple.com
Thu Jul 29 17:58:04 PDT 2010


On Jul 29, 2010, at 4:42 PM, Ryan Schmidt wrote:

> I think it would be a Herculean effort to go through all 7200+ ports that we have to make sure they're relocatable. It would take years. I think I can speak for most of us when I say we're not going to do that. If you or someone wants to do that you could certainly begin the process, but I have better things to do with my time.

I think this is a very pertinent point.  While everything in MacPorts respects ${prefix} to the best of our knowledge, there are still permutations (${applications_dir} for example) and enough annoying "you compiled it for there, you better leave it there" issues in both applications and frameworks that it's just really not worth advertising the setting of ${prefix} (et al) as being something under the user's control.

This is also not a concept that should surprise or affront most users since it's an article of faith on the platform that unless an application is distributed as a relocatable bundle (AKA "drag install"), you can't really control the location that the Installer is going to use and shouldn't generally expect to (there are exceptions, but they're exceptions).  This goes double for things like Frameworks and plug-ins, which pretend to be relocatable but can only really be relocated to a very specific set of locations (sometimes only one) or they won't work, so they're effectively stapled in place too.

Of course, none of this precludes an "advanced deployment mode" for MacPorts on sites that need it, where /opt/local is just a MacFUSE process which automatically populates the hierarchy depending on some configurable search path, say "${USER}/MacPorts:/Volumes/localcache/MacPorts:/Network/Library/MacPorts" in your typical academic environment.  Since FUSE passes along credentials with every request, you can easily expand $USER for the user actually asking, so my /opt/local does not need to look anything like Joe's /opt/local, and I can choose to install the bits under my own home directory or just fall back to whatever the administrator has helpfully installed for site-wide use.

Should be a simple matter of coding , Mark, and MacFUSE is even in MacPorts already, so there ya go!  When can we see your first prototype?  :-)

- Jordan






More information about the macports-dev mailing list