From owner-freebsd-hackers@freebsd.org Sat Mar 11 06:34:41 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 952A5D075FD; Sat, 11 Mar 2017 06:34:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54BC316A9; Sat, 11 Mar 2017 06:34:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 9CAD81C79; Sat, 11 Mar 2017 06:34:40 +0000 (UTC) Date: Sat, 11 Mar 2017 07:34:40 +0100 From: Baptiste Daroussin To: Steve Kargl Cc: freebsd-doc@freebsd.org, freebsd-current@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: MANPATH not handled correctly Message-ID: <20170311063440.jorxsa3hod2pjuxu@ivaldir.net> References: <20170108192633.GA42537@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6ih2mue2d5jdfik6" Content-Disposition: inline In-Reply-To: <20170108192633.GA42537@troutmask.apl.washington.edu> User-Agent: NeoMutt/20170225 (1.8.0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Mar 2017 06:34:41 -0000 --6ih2mue2d5jdfik6 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 Sorry it took time, but it is now fixed. the issue was we have kept our man= (1) when importing mandoc and I have not noticed that mandoc had that feature. I implemented it in our man(1) While here I removed the painful warning Best regards, Bapt --6ih2mue2d5jdfik6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAljDmn0ACgkQY4mL3PG3 PlqIRRAA0GuAKYqCdns5aaXDnYaSlT8sy60sxQVka+MBMn5B22lxpXJwInSg/BqA FZeKXOhiKato4L98FkZwI03mxBZy9ohG/eK3kaBDs3MpD2fLbXl6BSlOvsyOoid6 K1jv/1qGEu1y8H1tCg5Jd2dzr4Do8lhOChMhu16zMpse97aJvJJewv4kMghUnSuu vzmrYH/JtECe2RCBbtbRsNVDlZ1BXDwtVTeEpi3ellGMyiKp4O1W3i6NAeVqv+Fe AYvUUzX2cGU2dvYgm9JEYM4Hk78IBoCutADSb/2bwDqcXSQsZfER4+Z1H7W2f5sL C0rQa1tHTdGMklzV9fgFwz+vuM5QK9XuolQk0sTismPRlTWSx5s2NBPnUT7iAk1Q 8HRkwR40JMT1fs71vV2pSIvDvcJhsclGxzHkYYz8MeciqSbrD8L6hyPq87YFkkgP hQpdH/5VzHLqPqoJtyXusHD42jMX4wtP680PYIj1uEwP3jZBDnXCFVB6AYsDMfLf 0ofSueD2HK+3CciO0oLYhh6GxlH+/6CnZc9S4CjZnpECd+S1LJn9EAqFkQAqEq5U 81kK82jH1YFffpHeKJhZnVh3oj53YRni1dBfI9dAhLRI4/gXrRCcygB6OQjuCpaq x8a3Bwj1Xqb/AcrLjfOSayjMfiQ7O0YMhXfyzygqwVeYHy7E31s= =wBwk -----END PGP SIGNATURE----- --6ih2mue2d5jdfik6--