Home

January 5th, 2008

10:45 am
fink and the manpath

No, it's not some crazy sex story, though you really should 'man sex'

So I decided to install GNU's coreutils on my OS/X box instead of using the stock BSD ones... what can I say, I got too cranky at having cp balk at me when I tried to do a 'cp -a'. So when I downloaded the coreutils from ftp.gnu.org everything went well... no patches were needed or anything!!

So I did a 'man cp' on my desktop and I got the GNU man page for cp. I went to install the coreutils on my macbook, and that was a different story. After some mucking about, I noticed was that when I ran Fink's init.sh, it would munge my $MANPATH. It would put /usr/share/man before /usr/local/share/man! I tried to check out the init.sh script, and I just couldn't quite figure it out.

SO, what happens is that when you don't have $MANPATH set, it is figured out automagically based on your current $PATH settings - a little program called /usr/bin/manpath shows you what the current setting is for the manpath. HOWEVER if $MANPATH is set, this will override the automagic.

If you want /usr/local/share/man to come before /usr/local/sw/share/man (and as a result of running that init.sh script, /usr/share/man), set your $PATH before running the init.sh script. Then /usr/local/share/man will be automagically set when the init.sh runs, and [munges|tries to set] your MANPATH.