NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/50460: Issues with apropos(1) legacy mode



>Number:         50460
>Category:       bin
>Synopsis:       Issues with apropos(1) legacy mode
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 22 14:10:00 +0000 2015
>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@localhost:/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);



Home | Main Index | Thread Index | Old Index