NetBSD Problem Report #8977

Received: (qmail 19353 invoked from network); 9 Dec 1999 18:27:58 -0000
Message-Id: <19991209182737.7A439DBD@WintelKiller.HEH.Uni-Oldenburg.DE>
Date: Thu,  9 Dec 1999 19:27:37 +0100 (MET)
From: Thilo.Manske@HEH.Uni-Oldenburg.DE
Reply-To: Thilo.Manske@HEH.Uni-Oldenburg.DE
To: gnats-bugs@gnats.netbsd.org
Subject: makewhatis fails with non-numerical sections
X-Send-Pr-Version: 3.95

>Number:         8977
>Category:       bin
>Synopsis:       makewhatis fails with non-numerical sections
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 09 10:30:00 +0000 1999
>Closed-Date:    Sat Dec 11 20:31:19 +0000 1999
>Last-Modified:  Sat Dec 11 20:32:02 +0000 1999
>Originator:     Thilo Manske
>Release:        NetBSD-current since addition of the C-version of makewhatis
>Organization:
Dies ist Thilos Unix Signature! Viel Spass damit.
>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.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: tron 
State-Changed-When: Sat Dec 11 12:31:19 PST 1999 
State-Changed-Why:  
"makewhatis" now supports sections "l" and "n". 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.