Bug 21619

Summary: apropos breaks when /usr/man/whatis contains non-ASCII chars
Product: [Retired] Red Hat Linux Reporter: Ed Avis <ed>
Component: manAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-01-16 17:35:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ed Avis 2000-12-02 18:08:54 UTC
Some packages' man pages (not from Red Hat) contain funny characters in the
summary line.  This seems to happen especially with mathematics libraries
which have funny characters for mathematical symbols.  This breaks apropos,
because it uses grep and grep doesn't print matching lines from a 'binary
file'.

Thus you get:

% apropos sgml
Binary file /usr/man/whatis matches

These packages are behaving badly by putting weird characters into their
man pages, but apropos should be able to cope.

The fix is to pass the -a or --text flag to grep.  This can be done by
changing a couple of lines in /usr/bin/apropos:

aproposgrepopt1='ia'
aproposgrepopt2=''
whatisgrepopt1='iwa'
whatisgrepopt2='^'

The same change needs to be made to /usr/bin/whatis - in fact they are the
same file apart from one tiny change.  I think the intention is that one be
a symlink to the other and then the program looks at $0 when run - I'm not
sure why you've chosen not to do it like this.

Comment 1 Need Real Name 2001-01-16 17:35:14 UTC
Look at bugzilla 24121 - I have fixed this in the srpm...

Comment 2 Bernhard Rosenkraenzer 2001-04-25 08:59:35 UTC
Fixed in 1.5i-1


Comment 3 Bernhard Rosenkraenzer 2001-04-25 09:07:21 UTC
*** Bug 24121 has been marked as a duplicate of this bug. ***