Date: Tue, 10 Jan 2017 14:02:17 +0100 From: Baptiste Daroussin <bapt@FreeBSD.org> To: Steve Kargl <sgk@troutmask.apl.washington.edu> Cc: freebsd-doc@freebsd.org, freebsd-current@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: MANPATH not handled correctly Message-ID: <20170110130216.kfzpyhqkmrfie6pp@ivaldir.etoilebsd.net> In-Reply-To: <20170108192633.GA42537@troutmask.apl.washington.edu> References: <20170108192633.GA42537@troutmask.apl.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--upwsy5u42p4sko2n Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 08, 2017 at 11:26:33AM -0800, Steve Kargl wrote: > MANPATH is not handled correctly. According to the documentation > in apropos(1) and whatis(1): >=20 > MANPATH The standard search path used by man(1) may be changed by > specifying a path in the MANPATH environment variable. Inval= id > 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. >=20 > I have a manpage named mkpic in $HOME/man/man1. I also have the FreeBSD > installed manpages, e.g., /usr/share/man/man1/cat.1.gz. If I have > 'setenv MANPATH :$HOME/man' in my .cshrc file, then the following occurs:= =20 >=20 > % setenv | grep MANPATH > MANPATH=3D:/home/kargl/man > % apropos mkpic > (Warning: MANPATH environment variable set) > mkpic(1) - construct a contour image in MIFF image format > % apropos cat > (Warning: MANPATH environment variable set) > matrix(3) - Array and matrix allocation for FFT library >=20 > So, the above description of MANPATH is incorrect as :/home/kargl/man > should have been appended to the default MANPATH. >=20 > Interestingly, manpath(1) seems to described what actually happens > (long lines wrapped): >=20 > % unsetenv MANPATH > % manpath > /home/kargl/man:/usr/local/man:/usr/share/man:/usr/share/openssl/man:\ > /usr/local/lib/perl5/site_perl/man:/usr/local/lib/perl5/5.20/perl/man:\ > /usr/local/share/xpdf/man > % setenv MANPATH :$HOME/sman > % manpath > (Warning: MANPATH environment variable set) > :/home/kargl/man >=20 > The expected result according apropos(1) and whatis(1) for last command is >=20 > % manpath > /home/kargl/man:/usr/local/man:/usr/share/man:/usr/share/openssl/man:\ > /usr/local/lib/perl5/site_perl/man:/usr/local/lib/perl5/5.20/perl/man:\ > /usr/local/share/xpdf/man:/home/kargl/man >=20 > Instead of (un)fixing the documentation for apropos(1) and whatis(1), it > would be preferable to fix manpath to match the description in those > manpages. In addition, the Warning should be removed or at least an > option should be available to suppress the (useless/annoying) Warning. > This would restore man(1), apropros(1), and whatis(1) to its historical > behavior prior to svn revision 213317. >=20 > If the documentation for apropos(1) and whatis(1) is unfixed, then manpat= h(1) > should have HISTORY and BUGS sections. The BUGS section should explicitly > not that MANPATH is no longer a changeable environmental variable by a > user without incurring the Warning. >=20 Sounds like a bug, I will have a look as soon as I can Thanks for reporting, Best regards, Bapt --upwsy5u42p4sko2n Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlh021YACgkQY4mL3PG3 PloyXhAA3y9ge8ds7DrzprPT45aC0s2GcsJ8YS013RlM3O//oI0sACEnWYEjP6H0 flIKoNf7LmMdPuJy60IettSZW11FcmCFzahXZ0ZXhba2fpJFq8P/fWH/XOQL+RZL J3xnZmSKsmD0EeuSnAQYtAClg1aFjRPfejU/L2XyHsQr1fnqloOeGc/V7LI276JT IdAYyswC0dAL9+0HihaUjkdMcNFLwXDNgApfSYfgbd/B5kbRUpotv3G6G/tW3EBk uEXv4X2XAcXcrtmycCTLxgYGzo7lGWeVBz+YKw4UGk9d4xPy8VhocML04PBwZr6x G6C/FZSmB/bYqUdzPKTQoW5lLWtJtgzg1rqIjyQq5XFfGkCNyRMfIMIHuHoYpqIC reOjLkmOvO6GTGoBQ52ImMG836/lLxs8QF6ksuXCtduaJ3V+vsy0xb0BNeV7R8D7 7fp8k4lQr09oRF6GzKxWjuj9F0vXlkD0VUw+ifypySBnMWJrf/7xmJJOgmZ1rpa/ u+cEHATmNyfA2e6riXxqiaVPp8aWbNmxzDzRUjPbJEerVWIAAYMzCJB5sPdL+4DH 1UKBo2BDR37UOAmdjB+5/KvLwyB9lFtzTvE7gpJI1PTkhORQwBpaTJj5pVpNsn03 4s3VT6Ebkv6KrWJ289S67gktSBXADP0yVwWvUfhHXmUoy2F8fls= =Xo3K -----END PGP SIGNATURE----- --upwsy5u42p4sko2n--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170110130216.kfzpyhqkmrfie6pp>