From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout.scc.kit.edu (scc-mailout.scc.kit.edu [129.13.185.202]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id pBAEBW01001206 for ; Sat, 10 Dec 2011 09:11:34 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1RZNeF-0003t7-PZ; Sat, 10 Dec 2011 15:11:31 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RZNeF-0003pL-Pn; Sat, 10 Dec 2011 15:11:31 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RZNeF-0000st-Od; Sat, 10 Dec 2011 15:11:31 +0100 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1RZNeF-0000vV-Nq; Sat, 10 Dec 2011 15:11:31 +0100 Date: Sat, 10 Dec 2011 15:11:31 +0100 From: Ingo Schwarze To: tech@mdocml.bsd.lv Cc: jmc@openbsd.org Subject: Re: chdir() in mandocdb Message-ID: <20111210141131.GD6375@iris.usta.de> References: <4EDF49CE.3040508@bsd.lv> <20111208013430.GD19643@iris.usta.de> <4EE07044.4070605@bsd.lv> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EE07044.4070605@bsd.lv> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Kristaps, Kristaps Dzonsons wrote on Thu, Dec 08, 2011 at 09:07:32AM +0100: > Ingo Schwarze wrote: >> Kristaps Dzonsons wrote: >>> I notice that the chdir() for mandocdb()'s OP_NEW is into the base >>> directory of the manuals (e.g., /usr/share/man). However, when I >>> run mandocdb over OpenBSD 5.0, I see a few inconsistencies: >>> >>> /usr/X11R6/man/man3/XUngrabDevice.3 >> That was a bug in Xenocara, i fixed it here: >> >> http://www.openbsd.org/cgi-bin/cvsweb/xenocara/lib/libXi/man/ \ >> XIUngrabDevice.man [...] >>> All of these have an `so' in the current directory. Looking at >>> roff(7) for `so', this is the correct behaviour. >> No; the roff(7) manual muddles the point. >> What it says is correct, but only makes sense >> when you already know that man(1) does a chdir(2) >> to the root of the tree. > Can we disambiguate roff(7) to this effect, assuming that the man(1) > behaviour is consistent across operating systems? Well, it has to be, X manuals enforce that consistency. Hence, OK for the following patch? Ingo Index: roff.7 =================================================================== RCS file: /cvs/src/share/man/man7/roff.7,v retrieving revision 1.17 diff -u -r1.17 roff.7 --- roff.7 23 Nov 2011 02:12:22 -0000 1.17 +++ roff.7 10 Dec 2011 14:06:50 -0000 @@ -870,6 +870,22 @@ .Qq ../ and .Qq /.. . +.Pp +This request requires +.Xr man 1 +to change to the right directory before calling +.Xr mandoc 1 , +per convention to the root of the manual tree. +Typical usage looks like: +.Pp +.Dl \&.so man3/Xcursor.3 +.Pp +As the whole concept is rather fragile, usage of +.Sx \&so +is discouraged. +Use +.Xr ln 1 +instead. .Ss \&ta Set tab stops. This line-scoped request can take an arbitrary number of arguments. -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv