Bug 142936 (IT_65243) - makewhatis can't handle a directory in a manpage directory
Summary: makewhatis can't handle a directory in a manpage directory
Keywords:
Status: CLOSED ERRATA
Alias: IT_65243
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: man
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks: 156320
TreeView+ depends on / blocked
 
Reported: 2004-12-15 03:45 UTC by Pete Fritchman
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version: RHBA-2005-326
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-28 19:51:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:326 0 qe-ready SHIPPED_LIVE man bug fix update 2005-09-28 04:00:00 UTC

Description Pete Fritchman 2004-12-15 03:45:27 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; rv:1.7.3)
Gecko/20040913 Firefox/0.10

Description of problem:
The readline() function in the awk in makewhatis calls "getline" on
every file it tries to parse (awk's input).  makewhatis feeds awk like
this:
find . -name '*' $findarg -print | $AWK ...
This could include a directory (we have an "OLD" directory in
/usr/local/man/man* because our local install(1) binary creates it as
a backout path; there could be a directory here for any reason,
though).  getline in awk throws an error on a directory.  There's no
point in feeding awk directories (or anything other than files) if we
know it won't be able to handle them.  I propose:
find . -name '*' $findarg \! -type d -print | $AWK ...
I can't decide if "-maxdepth 1" should also be added to exclude files
in subdirectories -- we want to exclude them in this specific case
(OLD backout files), but I'm not sure if there's ever a legitimate
case where you want to look at man files in subdirs.

Version-Release number of selected component (if applicable):
man-1.5k-10

How reproducible:
Always

Steps to Reproduce:
1. mkdir /usr/local/man/man1/OLD
2. makewhatis -w

    

Actual Results:  awk: cmd. line:10: (FILENAME=- FNR=1) fatal: file
`./OLD' is a directory


Expected Results:  We should not have fed a directory to awk that uses
"getline" which only works on a file.

Additional info:

Comment 5 Ivana Varekova 2005-03-17 15:27:05 UTC
Thank you for your notice. 
The new version is in errata process now.
Ivana Varekova

Comment 14 Red Hat Bugzilla 2005-09-28 19:51:03 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-326.html



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