Bug 48330 - after upgrading man package, whatis no longer works
after upgrading man package, whatis no longer works
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: man (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Eido Inoue
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-07-10 05:37 EDT by Henning Schmiedehausen
Modified: 2007-04-18 12:34 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-23 16:33:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
The patch mentioned above (3.02 KB, patch)
2001-07-11 10:01 EDT, Henning Schmiedehausen
no flags Details | Diff
Sorry, this is the right patch. (3.08 KB, patch)
2001-07-11 10:37 EDT, Henning Schmiedehausen
no flags Details | Diff

  None (edit)
Description Henning Schmiedehausen 2001-07-10 05:37:31 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.18pre17-1t i686)

Description of problem:
After upgrading to man-1.5i2-0.6x, whatis seems to ignore the
/etc/man.config settings


How reproducible:
Always

Steps to Reproduce:
1. Upgrade the man package to man-1.5i2-0.6x
2. run /etc/cron.daily/makewhatis.cron
3. whatis xauth
 

Actual Results:  whatis returns "nothing appropriate"


Expected Results:  whatis should return 
"xauth                (1x)  - X authority file utility" 
as it did before the upgrade


Additional info:

If you look at the strace:

[pid 32529] open("lib/man.config", O_RDONLY) = -1 ENOENT (No such file or
directory)
[pid 32529] open("/etc/man.conf", O_RDONLY) = -1 ENOENT (No such file or
directory)
[pid 32529] open("/etc/man.config", O_RDONLY) = 3
[pid 32529] stat("/usr/man/C", 0xbfffd8cc) = -1 ENOENT (No such file or
directory)
[pid 32529] stat("/usr/man", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 32529] stat("/usr/share/man/C", 0xbfffd8cc) = -1 ENOENT (No such file
or directory)
[pid 32529] stat("/usr/share/man", 0xbfffd8f4) = -1 ENOENT (No such file or
directory)
[pid 32529] stat("/usr/local/man/C", 0xbfffd8cc) = -1 ENOENT (No such file
or directory)
[pid 32529] stat("/usr/local/man", {st_mode=S_IFDIR|0755, st_size=4096,
...}) = 0


Though it opens the /etc/man.config file, it seems to ignore the path
entries:

% grep -v ^# /etc/man.config
FSSTND
MANPATH /usr/man
MANPATH /usr/X11R6/man
MANPATH /usr/local/man
MANPATH /usr/kerberos/man
MANPATH /usr/lib/perl5/man
MANPATH /usr/man
[...]

and yes, there _is_ a man page in /usr/X11R6/man/man1x/xauth.1x.gz


This goes right along with my last bug report. QA anyone? This man package
is a
real "monday morning" release. :-(
Comment 1 Bernhard Rosenkraenzer 2001-07-10 09:51:00 EDT
Can't reproduce this. Does it work if you remove and reinstall the package?
Does it work if you rm -rf /var/cache/man?
Comment 2 Henning Schmiedehausen 2001-07-10 10:52:43 EDT
% rpm -qa | grep man-1.5
man-1.5i2-0.6x
% ls -la /usr/X11R6/man/man1/xauth.1x.gz 
-r--r--r--    1 root     root         4057 Apr 16 14:15
/usr/X11R6/man/man1/xauth.1x.gz
% /usr/sbin/makewhatis -u -w
% whatis xauth
xauth: nothing appropriate

rm'ing /var/cache/man doesn't help much, because:

% rpm -qf /usr/bin/man
man-1.5i2-0.6x
% rpm -ql man | grep var
/var/catman

you're back on /var/catman, didn't you know?



Comment 3 Bernhard Rosenkraenzer 2001-07-11 06:24:03 EDT
I meant rm -rf /var/catman, of course.

Comment 4 Henning Schmiedehausen 2001-07-11 10:00:31 EDT
# whatis xauth
xauth: nothing appropriate
# cd /var/catman ; rm -rf *
# ls -la /var/catman
total 8
drwxr-xr-x    2 root     root         4096 Jul 11 15:14 .
drwxr-xr-x   22 root     root         4096 Jul  9 15:54 ..
# /etc/cron.daily/makewhatis.cron
# whatis xauth
 xauth: nothing appropriate

No change. BTW: Another cool feature:

% rpm -qa | grep man-1.5
man-1.5i2-0.6x
% makewhatis -V
makewhatis from man-1.5i1

The problem gets solved if you simply delete all whatis files from all man
directories. After this,
makewhatis -u -w collects all man pages and puts them into /usr/man/whatis.

If you really want to move all of the whatis stuff into a single directory, why
not use /var/catman?

After you mangled the makewhatis to use just a single whatis file, why not also
mangle the 
whatis program to actually only read this single file?

I attached you a patch that fixes whatis and makewhatis against the man-1.5i2
source. If I apply
this patch, rebuild the RPM, I get working whatis and makewhatis.  It also moves
the single whatis
file into /var/catman

You may also want to add a %post script to the RPM which deletes the whatis file
after an upgrade
to rebuild the whatis database.

Comment 5 Henning Schmiedehausen 2001-07-11 10:01:10 EDT
Created attachment 23307 [details]
The patch mentioned above
Comment 6 Henning Schmiedehausen 2001-07-11 10:37:52 EDT
Created attachment 23308 [details]
Sorry, this is the right patch.
Comment 7 Need Real Name 2002-07-26 16:56:47 EDT
Hi All,

   I do believe I stumbled across the same problem.  After upgrading
from 7.2 (fresh install) to 7.3 (upgrade install), "apropos" kept
giving me "nothing appropriate".  ("apropos" uses "whatis".)

   A posting to comp.os.linux.redhat only got one response from a 
7.3 fresh install that said he had no problem.  So that means
that the problem is with the upgrade.  Or, what is left on the
disk before the upgrade.

   So, I removed man (rpm -e man) and reinstalled it (rpm -ivh) from 
disk one.  No change in symptom.  Them I download the rawhide version 
of man and ran the upgraded (rpm -Uvh man-1.5j-9.i386.rpm).  Also,
no symptom change.

   Then I tried an "info" on "whatis" and got told to run the
following to rebuild the database:

              /usr/sbin/makewhatis

And, this cured it.

   So, my humble suggestion to the developer is to stick "makewhatis"
in the rpm install script for "man".  This would completely cure the problem.

Many thanks,
--Tony
aewell@gbis.com


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