multiple mac-ports installations and cleaning the hard drive...

Ryan Schmidt ryandesign at macports.org
Sun Feb 10 21:01:11 PST 2008


On Feb 10, 2008, at 22:44, Esteban Barahona wrote:

> El feb 10, 2551 BE, a las 22:13, Ryan Schmidt escribió:
>
>> On Feb 10, 2008, at 21:16, Esteban Barahona wrote:
>>
>>> finally the port command funtioned, I tried installing GIMP but  
>>> there was a lot of dependancies missing (I have to learn to use  
>>> autotools for this to work... but that's for another day). But  
>>> I'm not asking for help with this... it will eventually work...  
>>> somehow...
>>>
>>> What I'm asking is to standarize a bit the use of directories  
>>> that are used by macports,
>>
>> What's nonstandard? I'm not even sure what directories you're  
>> talking about. There is of course the standard that ports should  
>> install binary files into ${prefix}/bin, libraries into ${prefix}/ 
>> lib, applications into /Applications/MacPorts, and so forth.
>
> Ah... I didn't know of that behaviour. Maybe what I was thinking  
> was more on a way to make all this functionality "visible" to  
> "users" (an interface)... so that ports can be tested by more  
> people. This is the "users" list; but in this project (I guess)  
> most users are actually developers...

What would you like to be more visible? I'm not sure I understand.  
Software needs to be installed somewhere; most Unix software (which  
is a large portion of what MacPorts installs) installs to standard  
directories, such as many of those defined by the Filesystem  
Hierarchy Standard:

http://www.pathname.com/fhs/

For the double-clickable Mac software installed by MacPorts, the  
Apple-standard location is /Applications, so MacPorts creates a  
directory there that it can own and installs apps into that.

For any port foo, you can see where it installed its files by using:

port contents foo

>>> so that it can be deleted easily.
>>
>> Instructions for deleting MacPorts are in the wiki:
>>
>> http://trac.macports.org/projects/macports/wiki/ 
>> FAQ#HowdoIremoveoruninstallMacPorts
>>
>>> Also, is there a way to install macports and its ports as a non- 
>>> root user?
>>
>> Yes! Some ports may not work this way because few people test it  
>> this way. But many ports will work this way.
>>
>> When you ./configure --prefix=... --with-install-user=... --with- 
>> install-group=...
>
> Thanks.
>
>>> does this apps use some form of sandboxing or jails?
>>
>> Jails no, sandboxing yes. During the destroot phase, port contents  
>> are installed to a sandbox. Once that succeeds, it's copied to the  
>> right place. Ports might install things outside of ${prefix} but  
>> if they do, port will print a warning so that you will know.
>
> What's &(prefix)? Is it a way to automate some form of "macports  
> root directory"?

${prefix} is the variable in MacPorts portfiles that represents the  
prefix into which MacPorts was installed. The usual location is /opt/ 
local. The binary installers for MacPorts always install into the / 
opt/local prefix. If you want a different prefix, you can compile  
MacPorts yourself.

>>> Also, is there a frontend of macports that allows easy installing  
>>> and unistalling of apps?
>>
>> Yes, there are several. Some cost money, some don't.
>>
>> http://trac.macports.org/projects/macports/wiki/ 
>> FAQ#WherecanIfindaGUIfrontendforMacPorts
>
> thanks; I will test the free ones.
>
>>> This is to clean the hard drive, because some versions of ports  
>>> (a form of directory based versioning may also help) may be  
>>> installed multiple times because they don't work. Also, the  
>>> redundancy of directories may create issues if a port used them  
>>> (how to know which version to use). I'm aware that there is a way  
>>> to delete all ports and macports, but what if there's the need of  
>>> only tracking versions so that they can be deleted one by one?
>>
>> I'm not sure what you're talking about exactly... are you asking  
>> about simultaneous installation of different versions of a port?  
>> like, say, installing apach 2.2.6 and 2.2.8 at the same time? If  
>> so, that's not possible. Well, you can have them "installed", in  
>> MacPorts terms, but only one of them can be "active".
>
> This is better than what I expected! I like this behaviour. If this  
> can be used with what I think &(prefix) does, then I will test this  
> behaviour (and if possible code a front end).

You're welcome to code your own front-end, but consider that we  
already have three listed at the above URL, and that your time might  
be better spent contributing to one of those existing projects.



More information about the macports-users mailing list