NetBSD Problem Report #50460

From www@NetBSD.org  Sun Nov 22 14:07:57 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 8FCAEA64EF
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 22 Nov 2015 14:07:57 +0000 (UTC)
Message-Id: <20151122140755.6C10EA6712@mollari.NetBSD.org>
Date: Sun, 22 Nov 2015 14:07:55 +0000 (UTC)
From: er.abhinav.upadhyay@gmail.com
Reply-To: er.abhinav.upadhyay@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Issues with apropos(1) legacy mode
X-Send-Pr-Version: www-1.0

>Number:         50460
>Category:       bin
>Synopsis:       Issues with apropos(1) legacy mode
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 22 14:10:00 +0000 2015
>Closed-Date:    Sun Mar 20 18:18:53 +0000 2016
>Last-Modified:  Sun Mar 20 18:18:53 +0000 2016
>Originator:     Abhinav Upadhyay
>Release:        
>Organization:
>Environment:
NetBSD abhinavu 7.99.20 NetBSD 7.99.20 (GENERIC.201507122140Z) #0: Sun Jul 12 22:30:59 UTC 2015  builds@b45.netbsd.org:/home/builds/ab/HEAD/amd64/201507122140Z-obj/home/source/ab/HEAD/src/sys/arch/amd64/compile/GENERIC amd64

>Description:
The apropos(1) legacy mode does not search through the one line description of the NAME section, it only matches the name of the man pages.

It also doesn't respect the -s and -n options.
>How-To-Repeat:
abhinavu$ apropos -l copy file
apropos: No relevant results obtained.
Please make sure that you spelled all the terms correctly or try using better keywords.

abhinavu$ apropos -n 2 -l copy
prop_array_copyin_ioctl(9) - Copy property lists to and from kernel space
kcopy(9) - copy data with abort on page fault
copy(9) - kernel space to/from user space copy functions
bcopy(9) - copy byte string
CURLOPT_COPYPOSTFIELDS(3) - have libcurl copy data to POST
[Several more lines followed]

abhinavu$ apropos -2 -l copy
prop_array_copyin_ioctl(9) - Copy property lists to and from kernel space
kcopy(9) - copy data with abort on page fault
copy(9) - kernel space to/from user space copy functions
bcopy(9) - copy byte string
CURLOPT_COPYPOSTFIELDS(3) - have libcurl copy data to POST
XCopyArea(3) - copy areas
[Several more lines followed]
>Fix:
Index: apropos-utils.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/makemandb/apropos-utils.c,v
retrieving revision 1.17
diff -u -r1.17 apropos-utils.c
--- apropos-utils.c	18 Oct 2014 08:33:31 -0000	1.17
+++ apropos-utils.c	22 Nov 2015 13:18:12 -0000
@@ -559,9 +559,7 @@
 		"%s"
 		"%s",
 		snippet_args[0], snippet_args[1], snippet_args[2],
-		wild,
-		section_clause ? section_clause : "",
-		snippet_args[0], snippet_args[1], snippet_args[2],
+		wild, wild,
 		section_clause ? section_clause : "",
 		limit_clause ? limit_clause : "");
 		free(wild);

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50460 CVS commit: src/usr.sbin/makemandb
Date: Sun, 20 Mar 2016 13:31:09 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Sun Mar 20 17:31:09 UTC 2016

 Modified Files:
 	src/usr.sbin/makemandb: apropos-utils.c

 Log Message:
 PR/50460: Abhinav Upadhyay: Fix legacy apropos query to match both the name
 and the one line description and delete extra args.


 To generate a diff of this commit:
 cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/makemandb/apropos-utils.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 20 Mar 2016 18:18:53 +0000
State-Changed-Why:
christos committed it


>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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.