From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-2.sys.kth.se (smtp-2.sys.kth.se [130.237.32.160]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id pBIJp6Ux019706 for ; Sun, 18 Dec 2011 14:51:07 -0500 (EST) Received: from mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) by smtp-2.sys.kth.se (Postfix) with ESMTP id BC28414EA61 for ; Sun, 18 Dec 2011 20:51:00 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-2.sys.kth.se ([130.237.32.160]) by mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) (amavisd-new, port 10024) with LMTP id TWdpjsVPDY5E for ; Sun, 18 Dec 2011 20:50:59 +0100 (CET) X-KTH-Auth: kristaps [83.250.6.251] X-KTH-mail-from: kristaps@bsd.lv X-KTH-rcpt-to: tech@mdocml.bsd.lv Received: from macky.local (c83-250-6-251.bredband.comhem.se [83.250.6.251]) by smtp-2.sys.kth.se (Postfix) with ESMTP id AB02C14EA37 for ; Sun, 18 Dec 2011 20:50:58 +0100 (CET) Message-ID: <4EEE4422.7060407@bsd.lv> Date: Sun, 18 Dec 2011 20:50:58 +0100 From: Kristaps Dzonsons User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 To: tech@mdocml.bsd.lv Subject: Re: MANPATH and overriding/modifying default paths. References: <4EEDFE12.4020702@bsd.lv> <4EEE01E4.9010604@bsd.lv> <20111218190950.GB28863@usta.de> In-Reply-To: <20111218190950.GB28863@usta.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 18/12/2011 20:09, Ingo Schwarze wrote: > Hi Kristaps, > > Kristaps Dzonsons wrote on Sun, Dec 18, 2011 at 04:08:20PM +0100: >> On 18/12/2011 15:52, Kristaps Dzonsons wrote: > >>> A while back, I complained to Ingo that MANPATH is heavy-handed: it >>> doesn't allow us to modify the default search path (in, e.g., >>> /etc/man.conf), but only override it. >>> >>> He mentioned that in manpath(1) used on systems, MANPATH can modify >>> instead of override by placemen to colons. To wit: > >> Ugh, I obviously shouldn't type so quickly... "the manpath(1) >> utility (Mac OS X, FreeBSD, Linux) can modify the default list by >> placement of colons". > > Heh, you are doing that for manpath(1)-based systems only. > In that case, i have certainly no objection. > > Hum, how do we document that, if it is done for manpath(1), > but not for man.conf(5)? Not sure, but that's hardly a show > stopper, that can certainly be solved. > > Maybe it might be useful for man.conf(5)-based systems as well. > But i'm not really sure; i never needed it, and i'm a bit hesitant > to change utilities to use environment variables for yet more > functionality. In any case, i'd rather not change the semantics > related to man.conf(5) right now, to not interfere with getting > apropos(1) ready. We can return to it later, when we want to. Saying man.conf(5)-based systems is a bit misleading, as manpath(1) systems generally use man.conf as well. Ugh! I think it's easier to say "manpath-systems" (FreeBSD, etc.) and "non-manpath-systems" (OpenBSD, etc.). Right now, if USE_MANPATH is invoked, manpath_parse() simply routes directly into manpath(1), passing environment variables and using the `-M', `-m', and `-C' flags accepted by manpath(1). So manpath(1) was already prepending/appending MANPATH. The enclosed patch stretches this over non-manpath systems, as you can see. This brings non-manpath in line with manpath vis-a-vis the MANPATH variable. As mentioned, I really like it just because I've specifically been thwarted by this before. Since few people use MANPATH anyway, and usually in the correct colon-separated way, I don't see how this will bother users, too. Thoughts? Kristaps -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv