Subject: bin/8977: makewhatis fails with non-numerical sections
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Thilo.Manske@HEH.Uni-Oldenburg.DE>
List: netbsd-bugs
Date: 12/09/1999 10:31:00
>Number: 8977
>Category: bin
>Synopsis: makewhatis fails with non-numerical sections
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Dec 9 10:30:00 1999
>Last-Modified:
>Originator: Thilo Manske
>Organization:
Dies ist Thilos Unix Signature! Viel Spass damit.
>Release: NetBSD-current since addition of the C-version of makewhatis
>Environment:
System: NetBSD WintelKiller 1.4P NetBSD 1.4P (WintelKiller) #176: Fri Dec 3 00:46:22 MET 1999 thilo@WintelKiller:/usr/src/sys/arch/i386/compile/WintelKiller i386
>Description:
Some software packages come with manpages stored in manl or mann,
e.g. postgresql or tcl and tk.
It's even in /etc/man.conf:
# Specific section/directory combinations.
[...]
l /usr/{X11R6,X11,pkg,local}/man/{cat,man}l
n /usr/{X11R6,X11,pkg,local}/man/{cat,man}n
But makewhatis can't process those directories, because the sections are
non-numerical:
...
int
manpagesection(char *name)
{
char *ptr;
if ((ptr = strrchr(name, '/')) != NULL)
ptr++;
else
ptr = name;
while ((ptr = strchr(ptr, '.')) != NULL)
if (isdigit(*++ptr))
return (int)(*ptr - '0');
return -1;
}
...
>How-To-Repeat:
E.g.:
Install pkgsrc/databases/postgresql
ll <LOCALBASE>/pgsql/man looks like this:
drwxr-xr-x 2 pgsql pgsql 512 Sep 26 20:10 man1
drwxr-xr-x 2 pgsql pgsql 512 Sep 26 20:10 man3
drwxr-xr-x 2 pgsql pgsql 512 Sep 26 20:10 man5
drwxr-xr-x 2 pgsql pgsql 1536 Sep 26 20:10 manl
/usr/libexec/makewhatis <LOCALBASE>/pgsql/man
grep "(l)" <LOCALBASE>/pgsql/man/whatis.db
-- nothing --
>Fix:
Sorry, not included.
>Audit-Trail:
>Unformatted: