10.5 and $PATH variable

Ryan Schmidt ryandesign at macports.org
Wed Jan 9 14:13:58 PST 2008


On Jan 9, 2008, at 15:58, Matrix Mole wrote:

> I just obtained a new mac mini today with Leopard installed on it.  
> Since
> this is my first experience with 10.5, I'm still learning some things.
> One of the first things I did though was to install macports. After  
> the
> installation, I noticed that the .profile file wasn't modified to
> include /opt/local/bin and /opt/local/sbin like my 10.4 version  
> was. At
> least, I think I installed the 10.4 version from the dmg image.
>
> Anyway, after doing a little looking around on the file system and
> reading the startup files, I discovered two things. First, there is no
> default .bash_profile, .bashrc, or .profile in the users startup
> directory. No problem there, just left up as an experience for the  
> user
> to perform if they need to customize their environment beyond the
> default. Secndly, I learned that Leopard has /etc/paths and
> /etc/manpaths files that are used during login to set the default  
> paths
> and manpaths. By adding /opt/local/bin and /opt/local/sbin to /etc/ 
> paths
> and putting /opt/local/man into the man path, I can guarantee that  
> these
> are added to the path for any user on the system.
>
> This is actually a pretty cool idea, and it prompted the reason for my
> email. Could it be possible to modify the port install scripts to add
> it's paths to those two files on 10.5? Those files don't exist nor are
> used on 10.4 as I already checked, so the 10.4 install scripts  
> wouldn't
> need modified.
>
> Just wondering, and not even sure if this has already come up and been
> discussed to death. Since I just got Leopard, I hadn't been reading
> anything related to that version up till now.

This has already come up and been discussed to death. :) See:

http://lists.macosforge.org/pipermail/macports-dev/2007-November/ 
003606.html

Discussion continues in December:

http://lists.macosforge.org/pipermail/macports-dev/2007-December/ 
003706.html

It was my understanding that the MacPorts path setup was redone for  
the 1.6.0 release. See the first change listed under the 1.6.0  
release in the ChangeLog:

http://trac.macosforge.org/projects/macports/browser/tags/ 
release_1_6_0/base/ChangeLog

"Revamped the postflight script that is run by Installer.app with our  
pkg installer to gracefully handle the addition of PATH, MANPATH and  
DISPLAY environment variables separately, if needed. Read http:// 
guide.macports.org/#installing.binary.postflight.details for more  
information (jmpp in many commits directly on the release_1_6 branch)."

But I don't know if it properly handles the absence of  
~/.bash_profile, ~/.bashrc and ~/.profile.



More information about the macports-users mailing list