Bug 481650 - makewhat fails if /usr is read-only
Summary: makewhat fails if /usr is read-only
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: man
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-26 20:27 UTC by Bruce Jerrick
Modified: 2009-02-12 14:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-02-12 14:08:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bruce Jerrick 2009-01-26 20:27:55 UTC
Description of problem:
/usr/sbin/makewhatis skips man directories if they're read-only, because it
  thinks the 'whatis' database files go there.  In reality, the database is
  /var/cache/man/whatis .

Version-Release number of selected component (if applicable):
man-1.6f-11.fc10

How reproducible:
Always

Steps to Reproduce:
1. [Re-]mount /usr read-only
2. Run 'makewhatis -w -v'
  
Actual results:
Messages for virtually all man page directories, such as:
  skipping /usr/share/man - directory is readonly 
and the database file is not rebuilt.

Expected results:
Silence, with a new database file.

Additional info:

Comment 1 Bruce Jerrick 2009-01-30 20:24:20 UTC
The fix is simple -- the entire 'if' statement following this comment
can be removed (it's completely superfluous; the 'whatis' files are no
longer in the man dirs):

    # if $mandir is on a readonly partition, and the whatis file
    # is not a symlink, then let's skip trying to update it
    if ...
    ...
    fi

This is a better description of what a user sees:
On a freshly installed system (with no /var/cache/man/whatis
database yet):

    % man -k man
    man: nothing appropriate

If /usr is read-only, after running 'makewhatis', the same thing happens.

Comment 2 Ivana Varekova 2009-02-12 14:08:14 UTC
Thanks. Fixed in man-1.6f-16.fc11.


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