bin/116706: [patch] src/usr.bin/makewhatis/makewhatis.c - teach about .SS

Edwin Groothuis edwin at mavetju.org
Fri Sep 28 00:50:06 PDT 2007


>Number:         116706
>Category:       bin
>Synopsis:       [patch] src/usr.bin/makewhatis/makewhatis.c - teach about .SS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 28 07:50:05 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Edwin Groothuis
>Release:        FreeBSD 6.2-RELEASE-p4 i386
>Organization:
-
>Environment:
System: FreeBSD k7.mavetju 6.2-RELEASE-p4 FreeBSD 6.2-RELEASE-p4 #0: Thu Apr 26 17:55:55 UTC 2007 root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/SMP i386


>Description:

If you install net-mgmt/net-snmp, your whatis file will be clobbered
with rubbish:

    netsnmp_agent(3), The Net-SNMP agent(3) - The snmp agent responds to SNMP queries from management stations. "Modules" +1c -1c "Net-SNMP Agent handler and extensibility API" "The basic theory goes something like this: In the past, with the original mib module api (which derived from the original CMU SNMP code) the underlying mib modules were passed very little information (only the truly most basic information about a request). " +1c -1c "Maintain a registry of MIB subtrees, together with related information regarding mibmodule, sessions, etc" -1c "Trap generation routines for mib modules to use" -1c "net-snmp agent related processing" -1c

This should me:

    netsnmp_agent(3), The Net-SNMP agent(3) - The Net-SNMP agent - The snmp agent responds to SNMP queries from management stations.

This is caused by the man pages of net-snmp which don't have proper
.SH parts for the SYNOPSIS etc:

    .SH NAME
    The Net-SNMP agent \- The snmp agent responds to SNMP queries from management stations.  

    .PP
    .SS "Modules"

makewhatis.c checks for the new sections which start with .SH, but
not for new sections which start with .SS:

   .SH [text for a heading]
	 Set  up  an unnumbered section heading sticking out to the left.
   .SS [text for a heading]
	 Set  up a secondary, unnumbered section heading.  Prints out all

By applying the next patch it will teach makewhatis.c to treat .SS
with the same severity as .SH.

I have run /etc/period/weekly/320.whatis with the old version and
with the patched version of makewhatis(1) and the only changes in
the output were the man pages of the Net-SNMP port.

>How-To-Repeat:
>Fix:

Index: makewhatis.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/makewhatis/makewhatis.c,v
retrieving revision 1.10
diff -u -r1.10 makewhatis.c
--- makewhatis.c	5 Dec 2005 14:22:12 -0000	1.10
+++ makewhatis.c	28 Sep 2007 07:46:25 -0000
@@ -726,6 +726,8 @@
 		case STATE_MANSTYLE:
 			if (strncmp(line, ".SH", 3) == 0)
 				break;
+			if (strncmp(line, ".SS", 3) == 0)
+				break;
 			trim_rhs(line);
 			if (strcmp(line, ".") == 0)
 				continue;
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list