Subject: misc/9743: makewhatis causes gratuitous dupes
To: None <netbsd-bugs@netbsd.org>
From: John Darrow <John.P.Darrow@wheaton.edu>
List: netbsd-bugs
Date: 04/10/2000 16:43:43
Date: Fri, 31 Mar 2000 15:23:34 +1100 (KOST)
From: John Hawkinson <jhawk@mit.edu>
Reply-To: jhawk@mit.edu
To: gnats-bugs@gnats.netbsd.org
Subject: makewhatis causes gratuitous dupes


>Number:         9743
>Category:       misc
>Synopsis:       makewhatis causes gratuitous dupes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 31 16:30:01 PST 2000
>Closed-Date:    
>Last-Modified:  
>Originator:     John Hawkinson
>Release:        NetBSD 1.4.2
>Organization:
	MIT
>Environment:

	
System: NetBSD zorkmid.mit.edu 1.4.2 NetBSD 1.4.2 (ZORKMID) #10: Mon Mar 27 12:33:31 CST 2000 jhawk@zorkmid.mit.edu:/usr/src/sys/arch/i386/compile/ZORKMID i386




>Description:
	makewhatis(8) can cause gratutios dupes in the whatis database,
because it processes both manpage source and formatted man page; if
there is a slight inconsistency between those manpages, then one
ends up with pairings like:


zorkmid% whatis rarpd
rarpd  (8) - Reverse ARP Daemon
rarpd (8) - Reverse ARP Daemon
zorkmid% whatis units
units (1) - conversion program
units - conversion program


etc. (I'm going to clean those up in a later PR, I think).


The reason for the fault is that there are small bugs in the roff
source that cause getNAME to produce different output from
nroff -mdoc | makewhatis.sed. Now, while all those bugs ought to
be fixed, any architecture where those bugs produce this
sort of duplication is, I think, flawed.


I'm not sure what fix to recommend. Presumably it was felt that
makewhatis-ing the formatted pages was necessary, so I'm loathe
to suggest removing it. Possible choices that occur to me are:


	rigorously lint the manpages. Fix "getNAME -v" to
	detect the above referenced common errors and
	have a lint: target in bsd.man.mk.


	Don't run makewhatis on a given formatted if there exists
	an unformatted version thereof.


>How-To-Repeat:

	
>Fix:

	
>Release-Note:
>Audit-Trail:
>Unformatted: