Added support in MacPorts base to set PATH and MANPATH automatically in Leopard

Juan Manuel Palacios jmpp at macports.org
Sun Dec 2 09:50:41 PST 2007


On Nov 30, 2007, at 1:00 PM, Bjarne D Mathiesen wrote:

> How about this:
>
> mkdir -p /etc/paths.d
> mv -n /etc/paths /etc/paths.d/999macosx
> touch /etc/paths
> echo "${prefix}/bin" > /etc/paths.d/000macports
> echo "${prefix}/sbin" >> /etc/paths.d/000macports
> echo "/Developer/Tools" > /etc/paths.d/888developer
>
> mkdir -p /etc/manpaths.d
> mv -n /etc/manpaths /etc/manpaths.d/999macosx
> touch /etc/manpaths
> echo "${prefix}/share/man" > /etc/manpaths.d/000macports
>
> If the paths are loaded in alphabetical order, this ought to ensure  
> that
> the macports paths are before the standard Mac OS X ones.
>
> You _do_ want the macport path to be before the standard paths as I
> guess you want to execute the alternative utilities provided by  
> macports
> instaed of those from Mac OS X ;-)


	Even though prepending our path settings to the environment (rather  
than appending them) is what is preferred and what has been proven to  
work more smoothly, a hack like what's being proposed above makes me  
very uncomfortable. Maybe I'm not sufficiently acquainted with its  
simplicity, but a mere glance makes me fearful of many things we could  
potentially be breaking. Actually, for that matter, the simple thought  
of changing anything in /etc/ is not something I'm not too happy with;  
for me that's a "hands off" area of the system... but I'm aware that's  
another discussion.

	So, has any conclusion been reached for this issue? I'm inclined to  
backing this feature out of the release_1_6 branch until a working  
consensus is reached, and only release it to the public at that time  
(in 1.6.x (x > 0)). Until now we've only been modifying the user  
"profile" for a range of bourne based shells and the "cshrc" file for  
equivalent C based shells, which has worked fairly well, I believe;  
anyone experienced enough to create something like ~/.bash_profile or  
anything else very shell specific would be savvy enough to setup his/ 
her own environment to their content, I'm sure. I'd strongly favor  
sticking to this approach in 1.6.0 until something better is found,  
unless it explicitly breaks expected behavior on Leopard. Does it?

	Regards,...


-jmpp



More information about the macports-dev mailing list