[MacPorts] #21625: .bash_profile $PATH handled incorrectly

MacPorts noreply at macports.org
Sat Sep 26 05:30:31 PDT 2009


#21625: .bash_profile $PATH handled incorrectly
---------------------------------------+------------------------------------
 Reporter:  curtis_ovid_poe@…          |       Owner:  macports-tickets@…                   
     Type:  defect                     |      Status:  new                                  
 Priority:  Normal                     |   Milestone:                                       
Component:  ports                      |     Version:  1.8.0                                
 Keywords:                             |        Port:                                       
---------------------------------------+------------------------------------
 After upgrading to Snow Leopard, I upgraded Mac Ports and discovered my
 $PATH was corrupted.  In checking my .bash_profile, I discovered this:

 {{{
 # MacPorts Installer addition on 2009-09-08_at_09:58:50: adding an
 appropriate PATH variable for use with MacPorts.
 export PATH=/opt/local/bin:/opt/local/sbin:$PATH
 # Finished adapting your PATH environment variable for use with MacPorts.
 }}}
 There were two problems with this.  First, I already had /opt/local/bin in
 my path, so now it's there twice.  Second, I keep $HOME/bin in my path
 first.  That's because I need to ensure that my programs take precedence
 over what's installed.  What I would like to see is:

  * Don't add directories already in the path.  If the user has added them,
 assume they know what they are doing (if /opt/local/bin isn't first in the
 path, maybe emit a warning to the user letting them know the
 consequences?)
  * If I have $HOME/bin first in my path, it's because I want $HOME/bin
 first in my path.  Please leave it there :)

 Cheers,
 Ovid

-- 
Ticket URL: <http://trac.macports.org/ticket/21625>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list