From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; rv:1.7.3)
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
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):
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.
Thank you for your notice.
The new version is in errata process now.
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.