Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 454880 - makewhatis does not index all man pages.
Summary: makewhatis does not index all man pages.
Alias: None
Product: Fedora
Classification: Fedora
Component: man
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-07-10 14:48 UTC by Andrew Piziali
Modified: 2008-07-23 07:02 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-07-23 07:02:48 UTC

Attachments (Terms of Use)
/var/cache/man/whatis (deleted)
2008-07-22 23:44 UTC, Andrew Piziali
no flags Details

Description Andrew Piziali 2008-07-10 14:48:38 UTC
Description of problem:

   The program "apropos" (and its equivalent "man -k") fails to find
   many man pages that include the search term in their "NAME" line
   because makewhatis does not index pages that define the NAME section
   header without quoting NAME:


   Only those man pages that quote NAME as in:


   are indexed.

Version-Release number of selected component (if applicable):


How reproducible:

   Always fails.

Steps to Reproduce:

   1. Note the word "shell" in the NAME section of the bash man page
      by running "man bash."

   2. apropos shell

   3. Note that bash man page is not reported.

Actual results:

   bash man page is not reported by "apropos shell."

Expected results:

   bash man page (and all other shell man pages) should reported by
   "apropos shell"

Additional info:

   The failure is due to makewhatis only stripping punctuation
   characters from the left edge of words while processing raw man pages
   and not those from the right edge.

   The bug is corrected by applying the following patch to

   --- /usr/sbin/makewhatis-	2008-04-07 04:12:54.000000000 -0700
   +++ /usr/sbin/makewhatis	2008-07-10 07:21:51.000000000 -0700
   @@ -296,7 +296,9 @@
		 while (!done && readline() > 0) {
   -		gsub(/.\b/, "");
   +		gsub(/.\b/, ""); # Remove punctuation adjacent to words,
   +		gsub(/\b./, ""); # such as the double quotes surrounding
   +				 # NAME in:  .SH "NAME"
		   if (($1 ~ /^\.[Ss][Hh]/ &&
		     ($2 ~ /[Nn][Aa][Mm][Ee]/ ||
		      $2 ~ /^JMÉNO/ || $2 ~ /^NAVN/ || $2 ~ /^NUME/ ||

   I recreated my whatis database using "makewhatis -w" and all shell
   man pages are now reported by "apropos shell."

Comment 1 Andrew Piziali 2008-07-18 13:27:31 UTC
One other data point: The implementation of makewhatis in Fedora Core 8 (man
version 1.6e, release 3.fc7) does not exhibit this bug.

Comment 2 Ivana Varekova 2008-07-21 11:41:30 UTC
I just try to reproduce this bug, but I was unsuccessful. I used the same
version of man-package but 
apropos shell 
command works for me, please do you use makewhatis command before you run
apropos?. Could you attach /var/cache/man/whatis file which was generated.

Comment 3 Andrew Piziali 2008-07-21 12:38:52 UTC
> I just try to reproduce this bug, but I was unsuccessful.  I used the
> same version of man-package but apropos shell command works for me,
> ...

Just to confirm, you used man-1.6f-4.fc6?

> ... please do you use makewhatis command before you run apropos?

Yes.  As configured by default in Fedora 9, makewhatis is run both daily and
weekly.  Daily it is run by cron with the -u (update database) option while
weekly the full database is rebuilt.

> Could you attach /var/cache/man/whatis file which was generated?

With some effort, yes.  The machine is in a small town in Oregon that I was
visiting and I am now back in Texas.  I'll have to instruct the machine user on
how to revert makewhatis back to the version installed by man-1.6f-4.fc6,
backing out my fix, and manually run makewhatis as it is run by cron.  I will
post an update to this bug report and the attached /var/cache/man/whatis file
this week.


Comment 4 Ivana Varekova 2008-07-21 13:00:23 UTC
I test both man-1.6f-4.fc9 and the last man-1.6f-5.fc9.i386 versions - and in
both cases everything was ok.
Thanks for your effort.

Comment 5 Andrew Piziali 2008-07-22 23:44:00 UTC
Created attachment 312407 [details]

This is the /var/cache/man/whatis database rebuilt using the original
makewhatis distributed with man-1.6f-4.fc9.  Unfortunately it does not exhibit
the problem originally reported!  I reverted makewhatis on this Fedora 9 system
to the original version and will monitor any evidence that it fails to index
all man pages, both those that use   .SH NAME	and those that use   .SH

Comment 6 Ivana Varekova 2008-07-23 07:02:48 UTC
Thanks for your help. For now I will close this bug as worksforme but if you see
this problem again please reopen it and copy /var/cache/man/whatis here.

Note You need to log in before you can comment on or make changes to this bug.