PATH procedures

Ryan Schmidt ryandesign at macports.org
Sat Oct 3 00:47:32 PDT 2009


On Oct 2, 2009, at 21:20, Scott Haneda wrote:

> Here is my PATH as reported by ENV
> PATH=/opt/local/bin:/opt/local/sbin:/opt/local/apache2/bin:/Users/me/ 
> bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
>
> Is this pretty standard, to have to add the {prefix}/apache2/bin to  
> your PATH?

At present, if you want apache2's binaries available without having to  
type the full path, then yes, you will have to do that to your PATH.


> Take this for example:
> $which mysql5
> /opt/local/bin/mysql5
>
> $which mysqldump5
> /opt/local/bin/mysqldump5
>
> That makes things really easy, since mysql's command binaries were  
> all decided to be located in {prefix}/bin, things just work right  
> off the bat.  Looking at the portfile for BIND, I can see that the  
> binary for named ends up in {prefix}/sbin/named, also in the default  
> ports PATH.
>
> Is Apache the lone soldier here, or should I expect to have to keep  
> appending to my PATH over time? I was also thinking, perhaps the  
> apache2 porfile, in the meantime, should symblink it's command  
> binaries, then there would be no need for that PATH alteration.  It  
> appears that is how mysql5 has done it.
>
> If I compare the mysql5 portfile, it is 2 lines of tcl in a repeat  
> loop to make it happen.  I would be happy to modify the port, or  
> post the suggestion to trac if this is the correct way to go about  
> this.

I don't recall specific other ports that install into their own  
prefixes, other than apache2 and apache20. I think there are a few,  
but probably not many.

I would not be particularly excited about modifying apache2 / apache20  
to symlink their binaries into ${prefix}/bin; rather, I would be  
excited to have it install the files there in the first place. See:

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


Note that the current mysql5 layout has also been criticized, and is  
therefore perhaps not a good model for emulation by other ports. See:

http://lists.macosforge.org/pipermail/macports-users/2007-August/004865.html

I think there are more recent discussions of that as well but I  
couldn't immediately locate them.




More information about the macports-users mailing list