Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 62606 - apropos (man -k) generating invalid grep arguments
apropos (man -k) generating invalid grep arguments
Product: Red Hat Linux
Classification: Retired
Component: man (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Eido Inoue
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2002-04-02 18:49 EST by Eric Gregory
Modified: 2007-04-18 12:41 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-06 15:41:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2003:133 normal SHIPPED_LIVE : Updated man packages fix minor vulnerability 2003-05-01 00:00:00 EDT
Red Hat Product Errata RHSA-2003:134 normal SHIPPED_LIVE Low: man security update 2003-04-28 00:00:00 EDT

  None (edit)
Description Eric Gregory 2002-04-02 18:49:16 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.4.9-13psmp i686)

Description of problem:
apropos or man -k does not yield correct results.
Most of the time, it simply reports 'nothing apropriate'.

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

How reproducible:

Steps to Reproduce:
% apropos paint

Actual Results:  % apropos paint
paint: nothing appropriate

Expected Results:  % apropos paint
gimp                 (1)  - an image manipulation and paint program
macptopbm            (1)  - convert a MacPaint file into a portable bitmap
pbmtomacp            (1)  - convert a portable bitmap into a MacPaint file
pgmoil               (1)  - turn a portable graymap into an oil painting
pjtoppm              (1)  - convert an HP PaintJet file to a portable pixmap
ppmtopj              (1)  - convert a portable pixmap to an HP PaintJet file
ppmtopjxl            (1)  - convert a portable pixmap into an HP PaintJet XL PCL
xpaint               (1x)  - Simple Paint program

Additional info:

The problem appears to be a typo in /usr/bin/apropos. 

In constructing the arg list to grep (lines 77,111),
it incorrectly  concatenates the supplied search term
to the second half of the options string. 

The fix is trivial. 
Lines 77 and 111 should be changed as follows: 
 < if grep -"$grepopt1"q "$grepopt2""$1" $d/whatis > /dev/null 
 > if grep -"$grepopt1"q"$grepopt2" "$1" $d/whatis > /dev/null 
 < if grep -"$grepopt1" "$grepopt2""$1" $d/whatis 
 > if grep -"$grepopt1""$grepopt2" "$1" $d/whatis
Comment 1 Eido Inoue 2003-01-06 15:41:57 EST
works in man-1.5j-11
Comment 2 Mark J. Cox 2003-04-28 08:45:57 EDT
An errata 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.


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