Added support in MacPorts base to set PATH and MANPATH
automatically in Leopard
James Berry
jberry at macports.org
Thu Nov 29 11:43:07 PST 2007
Hi Emmanuel,
On Nov 29, 2007, at 7:03 AM, Emmanuel Hainry wrote:
> Citando James Berry :
>> I just checked in some code (r31491:31492) that supplies and
>> installs spec
>> files for the /etc/paths.d and /etc/manpaths.d directories if they
>> are
>> present, as they are on Leopard.
>
> I thought macports was supposed not to mess with anything outside
> /opt/local. (apart from /Application/Macports and
> /Library/LaunchDaemons and a few others but aiming to reduce them
> whenever possible). Modifying things in the user's home directory is
> acceptable though.
I general, we don't do stuff outside of /opt/local, though we do also
install into /Library/Tcl, if memory serves, and also /Library/
LaunchDaemons, for instance. We try to be as minimal as possible, and
I think this fits into that category. And it seems to be, warts and
all, the Leopard "way" to do things.
Your question/point , however, is a completely valid one, which we'd
love feedback on. There's something very nice and clean about the
change I made (we just throw some files into a directory and don't
worry about editing the ~/.profile, which has its own share of
problems and snafus for less experienced users).
I think it's a question for the group in general: which is the best
approach? The range of choices we have is basically to pick from the
following menu:
- Install a file into /etc/manpaths.d/
- Install a file into /etc/paths.d/
- Munge ~/.profile to munge MANPATH
- Munge ~/.profile to munge PATH
Note that for man to work on Leopard, we have to do either 1 or 3, at
least, as Leopard now sets MANPATH, which means that the auto path
stuff for man doesn't work.
Note that just changing ~/.profile means that anybody who already has
~/.bash_profile, for instance, doesn't get the fix (though this could
be improved with better selection based on what profiles are available
and what SHELL is.
Feedback welcome. Anybody?
James
More information about the macports-dev
mailing list