Opened 16 years ago

Closed 16 years ago

#15104 closed enhancement (wontfix)

Setting Path Variables in Leopard

Reported by: autumn.ahlers@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc:
Port:

Description

After pulling my hair out trying to save my Path Variables for MacPorts, I found that Leopard uses a completely different method for saving Path Variables. The method described in the wiki does not work under Leopard. To save a Path Variable in Leopard, one must type out the MacPorts path in a Text Editor (i.e. "TextEdit") and save the file to /etc/path.d/ For example, I have a plain text file named "MacPorts" located in /etc/path.d/ that simply reads:

/opt/local/sbin /opt/local/bin

Works like a charm! This should definitely be included in the "how-to" wiki. Exporting the path to the

.profile

does not work. I had to export the path every session to get "port" to work.

Thanks for all the hard work !

Change History (2)

comment:1 Changed 16 years ago by autumn.ahlers@…

After pulling my hair out trying to save my Path Variables for MacPorts, I found that Leopard uses a completely different method for saving Path Variables. The method described in the wiki does not work under Leopard. To save a Path Variable in Leopard, one must type out the MacPorts path in a Text Editor (i.e. "TextEdit") and save the file to /etc/path.d/ For example, I have a plain text file named "MacPorts" located in /etc/path.d/ that simply reads:

/opt/local/sbin
/opt/local/bin

Works like a charm! This should definitely be included in the "how-to" wiki. Exporting the path to the .profile only works temporarily for the session but does not get saved. I had to export the path every session to get "port" to work.

Thanks for all the hard work !

comment:2 Changed 16 years ago by raimue (Rainer Müller)

Resolution: wontfix
Status: newclosed

No, this doesn't work right. We already evaluated /etc/path.d and /etc/manpath.d in trunk. Paths added in /etc/path.d are always appended *at the end* the current PATH. But usually you want stuff installed by MacPorts to 'hide' the system's default versions. Also, we don't want to add MacPorts system wide by default, but on a per-user basis.

Exporting PATH in .profile will always work and it is definitely not temporarily. Note that you maybe have a .bash_profile which takes precedence over .profile. See also http://guide.macports.org/#installing.shell

Note: See TracTickets for help on using tickets.