From owner-freebsd-stable@FreeBSD.ORG Tue Oct 30 10:42:23 2007 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F36A16A418; Tue, 30 Oct 2007 10:42:23 +0000 (UTC) (envelope-from xfb52@dial.pipex.com) Received: from galaxy.systems.pipex.net (galaxy.systems.pipex.net [62.241.162.31]) by mx1.freebsd.org (Postfix) with ESMTP id 31A6313C481; Tue, 30 Oct 2007 10:42:23 +0000 (UTC) (envelope-from xfb52@dial.pipex.com) Received: from [192.168.23.2] (62-31-10-181.cable.ubr05.edin.blueyonder.co.uk [62.31.10.181]) by galaxy.systems.pipex.net (Postfix) with ESMTP id 2F52CE000C7A; Tue, 30 Oct 2007 10:23:59 +0000 (GMT) Message-ID: <4727063E.7060107@dial.pipex.com> Date: Tue, 30 Oct 2007 10:23:58 +0000 From: Alex Zbyslaw User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.7.13) Gecko/20061205 X-Accept-Language: en MIME-Version: 1.0 To: Giorgos Keramidas , Andrew Lankford References: <47240A15.8080305@charter.net> <20071028074248.GA1511@haakonia.hitnet.RWTH-Aachen.DE> <4724BAD9.7000400@charter.net> <20071028164152.GA7516@eos.sc1.parodius.com> <4724BEB3.5080905@charter.net> <20071029132447.GA2658@kobe.laptop> In-Reply-To: <20071029132447.GA2658@kobe.laptop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: stable@freebsd.org, current@freebsd.org Subject: Re: /usr/share/man/man8/MAKEDEV.8 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2007 10:42:23 -0000 Giorgos Keramidas wrote: >On 2007-10-28 12:54, Andrew Lankford wrote: > > >>Thbbt! I'm reading the catman version of MAKEDEV. Wish I could >>disable that "feature". Oh well. I'll delete it all and rebuild it >>again if needed. Thanks! >> >> > >Ah, that's it then :) > >My usual `installworld' steps include this too: > > # cd /usr/share/man > # find cat[0-9] \! -type d -exec rm {} + > >This takes care of deleting any `stale' preformatted manpages, so the >next time I ask for a manpage, it's going to be reformatted. > > Seems to me that there must a logic error in man. Man makes the effort to check to see if the unformatted manpage is newer than the cat-ed manpage, and if it is, it will try to re-create the cat-ed manpage, and will show you an nroff'ed version of the unformatted manpage if it cannot recreate the cat-ed version. Clearly that's breaking in this scenario, because the mtime of the new unformatted manpage, while presumably newer than that of the old unformatted man page is still older than the mtime of the cat-ed page. What seems to be missing, is that when the cat-ed manpage is first created, it should have its mtime set to the same as the mtime of the unformatted manpage, not the time at which you happened to read the man page. I don't see any evidence of that is the sources on my system (which is quite old, but it certainly looks like the bug persists). A bit of stat and utimes jiggery pokery looks like it would solve this problem. An else clause for " else if (rename(temp, cat_file) == -1) {" in /usr/src/gnu/usr.bin/man/man/man.c would look like the place to do that. (Alternatively, you could view it as a bug of the install/upgrade process, since it could be argued that the mtime of the unformatted manpage should be the time that the manpage was installed. Presumably that isn't happening, else you wouldn't be seeing the cat-ed version). Of course, with modern systems where nroff-ing a man page takes negligible time and system resources, it could also be argued that cat-ed man pages should be a thing of the past :-) --Alex