apropos(1) with MANPATH is broken

From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Date: Sat, 13 Jun 2015 15:44:30 -0700
The recent change from historic mandoc to the newer stuff
has broken apropos(1).  From the apropos(1) manpage 


 MANPATH   The standard search path used by man(1) may be changed by
           specifying a path in the MANPATH environment variable.
           Invalid paths, or paths without manual databases, are
           ignored.  Overridden by -M.  If MANPATH begins with a
           colon, it is appended to the default list; if it ends with
           a colon, it is prepended to the default list; or if it
           contains two adjacent colons, the standard search path is
           inserted between the colons.  If none of these conditions
           are met, it overrides the standard search path.


In my .cshrc I have

setenv MANPATH /usr/local/man:/usr/share/man:$HOME/man

% setenv | grep MANP
MANPATH=/usr/local/man:/usr/share/man:/home/kargl/man
% apropos apropos
(Warning: MANPATH environment variable set)
/usr/home/kargl/man/mandoc.db: No such file or directory
apropos, whatis(1) - search manual page databases

Historically, there is no noise.  Neither the warning about
MANPATH being set nor a message about a missing .db file were
printed.  This should at least be hidden behind -v.

% unsetenv MANPATH
% apropos apropos
/usr/home/kargl/man/mandoc.db: No such file or directory
/usr/local/lib/perl5/site_perl/man/mandoc.db: No such file or directory
/usr/local/lib/perl5/5.16/perl/man/mandoc.db: No such file or directory
apropos, whatis(1) - search manual page databases

Unsetting MANPATH seems to not revert to a standard manpath of
/usr/share/man (or maybe /usr/local/man:/usr/share/man).  Also, why is
it suddenly picking up the perl5 directories?  There is no /etc/man.conf
on the system and login.conf does not define manpath.

setenv MANPATH :$HOME/man
% apropos apropos
(Warning: MANPATH environment variable set)
/usr/home/kargl/man/mandoc.db: No such file or directory

MANPATH was not appended to the standard search path.


So, starting the exercise over with MANPATH removed from .cshrc.
Re-login-ing into the system

% setenv | grep MAN

MANPATH is not set as expected.

% apropos apropos
/usr/home/kargl/man/mandoc.db: No such file or directory
/usr/local/lib/perl5/site_perl/man/mandoc.db: No such file or directory
/usr/local/lib/perl5/5.16/perl/man/mandoc.db: No such file or directory
apropos, whatis(1) - search manual page databases

So, some default search path is followed

% setenv MANPATH :$HOME/man
% apropos apropos
(Warning: MANPATH environment variable set)
/usr/home/kargl/man/mandoc.db: No such file or directory
% man apropos
No manual entry for apropos


-- 
Steve
Received on Sat Jun 13 2015 - 20:44:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:58 UTC