env_helper

Ryan Schmidt ryandesign at macports.org
Mon Mar 16 16:14:35 PDT 2009


On Mar 16, 2009, at 13:17, Rainer Müller wrote:

> On 2009-03-15 23:25, Bradley Giesbrecht wrote:
>>
>
>> I just added paths for ${PREFIX}/apach2/bin and ${PREFIX}/lib/mysql5/
>> bin to /opt/local/etc/env_helper/paths/PATH/(apache2 & mysql5).
>
> Okay, so you expect this to be added to PATH. At the front? At the  
> end?
> In which order?
>
> How will it now it needs to do concat at all and not replace?  
> (Thinking
> of possible more general settings). How will it know to concat  
> using ":"
> and not spaces?
>
> For apache2, this is just the old lame reason that nobody fixed the
> layout yet to be inside $prefix :-)
>
> mysql5 does not put the files into $prefix/bin because it conflicts  
> with
> mysql4. If now both ports add the alternative dir to PATH this  
> lends to
> confusion and breakage.

mysql4 and mysql5 still conflict:

http://trac.macports.org/ticket/4115

And there is no need to put ${prefix}/lib/mysql5/bin into PATH  
because mysql5 installs symlinks into ${prefix}/bin with the same  
names, just with "5" appended.


> By the way, can anybody think of other ports we did not talk about yet
> for which something like this could be useful? For example, I can  
> think
> of bash-completion.

Bradley mentioned p5 manpages in his first message, and I agree that  
would be useful. In the perl5.8 fixup thread I was thinking a way to  
solve the issue would be if the manpages could be put into different  
paths, if only MacPorts had a way of modifying the user's manpath.  
And with Bradley's script, now it does.


Currently the MacPorts binary installer modifies the user's .profile  
to munge the PATH and if necessary the MANPATH. I would prefer if  
instead MacPorts simply added a single line to load a MacPorts bash  
script which did that munging. This script would be owned by MacPorts  
and could be updated when MacPorts is updated. So if we ever decide  
to change what we want to munge in the .profile we could change it in  
our script and not have to re-munge the user's .profile.

Someone already wrote this script. It's in the repository. MacPorts  
base just doesn't use it.

If we used such a script, then that's where this path/env helper  
functionality could be built in, rather than having the user add  
another line to their .profile.




More information about the macports-dev mailing list