Bug 62606 - apropos (man -k) generating invalid grep arguments
Summary: apropos (man -k) generating invalid grep arguments
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: man (Show other bugs)
(Show other bugs)
Version: 7.2
Hardware: i686 Linux
medium
medium
Target Milestone: ---
Assignee: Eido Inoue
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-04-02 23:49 UTC by Eric Gregory
Modified: 2007-04-18 16:41 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-01-06 20:41:57 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 04:00:00 UTC
Red Hat Product Errata RHSA-2003:134 normal SHIPPED_LIVE Low: man security update 2003-04-28 04:00:00 UTC

Description Eric Gregory 2002-04-02 23:49:16 UTC
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:
Always

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
file
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: 
 77c77 
 < if grep -"$grepopt1"q "$grepopt2""$1" $d/whatis > /dev/null 
 --- 
 > if grep -"$grepopt1"q"$grepopt2" "$1" $d/whatis > /dev/null 
 111c111 
 < if grep -"$grepopt1" "$grepopt2""$1" $d/whatis 
 --- 
 > if grep -"$grepopt1""$grepopt2" "$1" $d/whatis

Comment 1 Eido Inoue 2003-01-06 20:41:57 UTC
works in man-1.5j-11

Comment 2 Mark J. Cox 2003-04-28 12:45:57 UTC
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.

http://rhn.redhat.com/errata/RHSA-2003-134.html



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