Bug 48330 - after upgrading man package, whatis no longer works
Summary: after upgrading man package, whatis no longer works
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: man
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Eido Inoue
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-07-10 09:37 UTC by Henning Schmiedehausen
Modified: 2007-04-18 16:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-23 20:33:07 UTC
Embargoed:


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

Description Henning Schmiedehausen 2001-07-10 09:37:31 UTC
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 13:51:00 UTC
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 14:52:43 UTC
% 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 10:24:03 UTC
I meant rm -rf /var/catman, of course.



Comment 4 Henning Schmiedehausen 2001-07-11 14:00:31 UTC
# 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 14:01:10 UTC
Created attachment 23307 [details]
The patch mentioned above

Comment 6 Henning Schmiedehausen 2001-07-11 14:37:52 UTC
Created attachment 23308 [details]
Sorry, this is the right patch.

Comment 7 Need Real Name 2002-07-26 20:56:47 UTC
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




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