I've read this thread through twice and I have to agree with Wolfman et. al. - there's something flakey going on here with path_helper.
First of all, according to the man man page:
ENVIRONMENT
MANPATH
If MANPATH is set, man uses it as the path to search for manual page
files. It overrides the configuration file and the automatic search
path, but is overridden by the -M invocation option. See SEARCH PATH
FOR MANUAL PAGES.
My /etc/profile looks like this (MANPATH is not explicitly set):
/etc: btf$ cat profile
# System-wide .profile for sh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
So, in my default configuration I get:
~: btf$ echo $MANPATH
~: btf$
~: btf$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/mysql/bin:/usr/local/bin /sandbox/Debug:/usr/local/bin/sandbox/Release:/usr/X11/bin
This is all as I expect.
However, take a look at the following build-up for the Automatic Search Path:
/etc: btf$ cat manpaths
/usr/share/man
/usr/local/share/man
/etc: btf$ cd manpaths.d
/etc/manpaths.d: btf$ ls
./ ../ X11 local mysql
/etc/manpaths.d: btf$ cat x11
/usr/X11/share/man
/etc/manpaths.d: btf$ cat mysql
/usr/local/mysql/man
/etc/manpaths.d: btf$ cat local
/usr/local/man
and
YET, when I check the search path, I find that the "local" ( /usr/local/man ) segment is missing:
/etc/manpaths.d: btf$ man -w
/usr/share/man:/usr/local/share/man:/usr/local/mysql/man:/usr/X11/man
This whole issue came about when I added growlinfo, which places its man page in /usr/local/man. I added the "local" file to manpaths.d (in the same way that I had previously added the "mysql" file to manpaths.d). Later on, I thought that perhaps "local" wasn't the best name for this file, so I renamed it to "growl" and tried again. Still no dice:
/etc/manpaths.d: btf$ sudo mv local growl
Password:
/etc/manpaths.d: btf$ ls
./ ../ X11 growl mysql
/etc/manpaths.d: btf$ cat growl
/usr/local/man
/etc/manpaths.d: btf$
(logout and login again)
~: btf$ man -w
/usr/share/man:/usr/local/share/man:/usr/local/mysql/man:/usr/X11/man
So now, just for s**ts and giggles, let's turn off path_helper and see what happens:
/etc: btf$ cat profile
# System-wide .profile for sh(1)
#if [ -x /usr/libexec/path_helper ]; then
# eval `/usr/libexec/path_helper -s`
#fi
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
Launch new shell and view paths:
~: btf$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin
~: btf$ echo $MANPATH
~: btf$
~: btf$ man -w
/usr/share/man:/usr/local/share/man:/usr/X11/man
As you can see both $PATH and the Auto Create MANPATH are significantly shorter in the absence of path_helper, so we no that it
IS doing
something - just not everything ! (Note that the Auto Created MANPATH no longer includes the mysql reference, which is as expected in the absence of path_helper. I'm guessing that X11 is somehow still included due to the heuristic search algorithm)
So, the question is
Why does path_helper see and append the mysql reference, but not the local (growl) reference ???