NetBSD Problem Report #46081

From www@NetBSD.org  Thu Feb 23 16:56:30 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 7A85C63E057
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 23 Feb 2012 16:56:30 +0000 (UTC)
Message-Id: <20120223165629.D722A63CAE9@www.NetBSD.org>
Date: Thu, 23 Feb 2012 16:56:29 +0000 (UTC)
From: Ephaeton@gmx.net
Reply-To: Ephaeton@gmx.net
To: gnats-bugs@NetBSD.org
Subject: new apropos claims 'n' as invalid section
X-Send-Pr-Version: www-1.0

>Number:         46081
>Category:       bin
>Synopsis:       new apropos claims 'n' as invalid section
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 23 17:00:01 +0000 2012
>Closed-Date:    Wed Apr 13 15:24:19 +0000 2016
>Last-Modified:  Wed Apr 13 15:24:19 +0000 2016
>Originator:     Martin S. Weber
>Release:        NetBSD 6.0_BETA
>Organization:
>Environment:
NetBSD uranos.nist.gov 6.0_BETA NetBSD 6.0_BETA (GENERIC) #0: Thu Feb 23 11:13:02 EST 2012  root@uranos.nist.gov:/data/obj/sys/arch/i386/compile/GENERIC i386
>Description:
the new apropos offers search in sections 1 through 9 only. 'n' is another section, typically used in e.g. tcl man pages. apropos -s n isn't working:

$ apropos -s n expr
apropos: Invalid section

Two things: 
1) it could say "Invalid section 'n'"
2) it should accept 'n' as a valid section
>How-To-Repeat:
See description
>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: "Martin S. Weber" <Ephaeton@gmx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/46081: new apropos claims 'n' as invalid section
Date: Fri, 2 Mar 2012 12:42:41 -0500

 As a reminder: netbsd-6 sources' default man.conf establish
 'n', 'l', '3F' and '3f' as valid, non-numeric sections. Also,
 valid sections are not predefined, but configured via man.conf(5).

 Imho, apropos/makemandb couldn't care less which section it's
 indexing (except for, of course, it using an integer at the
 moment to store the section. Then that's just a plain bug, too.)

 Regards, -Martin

From: Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>
To: gnats-bugs@netbsd.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, Ephaeton@gmx.net
Subject: Re: bin/46081: new apropos claims 'n' as invalid section
Date: Sun, 4 Mar 2012 07:51:58 +0530

 On Fri, Mar 2, 2012 at 11:15 PM, Martin S. Weber <Ephaeton@gmx.net> wrote:
 > The following reply was made to PR bin/46081; it has been noted by GNATS.
 >
 > From: "Martin S. Weber" <Ephaeton@gmx.net>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: bin/46081: new apropos claims 'n' as invalid section
 > Date: Fri, 2 Mar 2012 12:42:41 -0500
 >
 > =A0As a reminder: netbsd-6 sources' default man.conf establish
 > =A0'n', 'l', '3F' and '3f' as valid, non-numeric sections. Also,
 > =A0valid sections are not predefined, but configured via man.conf(5).
 >
 > =A0Imho, apropos/makemandb couldn't care less which section it's
 > =A0indexing (except for, of course, it using an integer at the
 > =A0moment to store the section. Then that's just a plain bug, too.)

 Hi,

 I have sent a patch to Joerg for review, supporting non-numeric
 sections is trivial.

 makemandb presently indexes only the first character of a section, so
 for a section number like '3f' it stores the section number as '3' in
 the database.
 If you try to do a query for '3'f with apropos, it should not report
 an error, but rather perform a search for section '3'. If it is purely
 desirable that a query for '3f' should query only man pages from
 section '3f' exactly, then it will be a bit of more work, but that is
 also very trivial to do

 --
 Abhinav

From: matthew green <mrg@eterna.com.au>
To: Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, Ephaeton@gmx.net,
    gnats-bugs@netbsd.org
Subject: re: bin/46081: new apropos claims 'n' as invalid section
Date: Sun, 04 Mar 2012 13:57:58 +1100

 > I have sent a patch to Joerg for review, supporting non-numeric
 > sections is trivial.

 thanks for looking at this.

 > makemandb presently indexes only the first character of a section, so
 > for a section number like '3f' it stores the section number as '3' in
 > the database.
 > If you try to do a query for '3'f with apropos, it should not report
 > an error, but rather perform a search for section '3'. If it is purely
 > desirable that a query for '3f' should query only man pages from
 > section '3f' exactly, then it will be a bit of more work, but that is
 > also very trivial to do

 it seems to me that the right thing is to consider the section
 name a string not a number.  (i'm surprised that no one has added
 "1m" section to man.conf over the years.)  but this part is not
 nearly as important as working at all :)


 .mrg.

From: "Martin S. Weber" <Ephaeton@gmx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/46081: new apropos claims 'n' as invalid section
Date: Sun, 4 Mar 2012 22:57:13 -0500

 On Sun, Mar 04, 2012 at 02:25:02AM +0000, Abhinav Upadhyay wrote:
 > The following reply was made to PR bin/46081; it has been noted by GNATS.
 >> (...)
 >  I have sent a patch to Joerg for review, supporting non-numeric
 >  sections is trivial.
 >  
 That's great. I'm looking forward to it being fixed and pulled up to NetBSD-6!

 Thanks Abhinav.

 -Martin

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 13 Apr 2016 15:24:19 +0000
State-Changed-Why:
Fixed, says Abhinav.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.