#138627 man-db: man -k: cleanup of cache/database is confusing

Package:
man-db
Source:
man-db
Description:
tools for reading manual pages
Submitter:
Jeff Sheinberg
Date:
2005-07-18 03:23:18 UTC
Severity:
wishlist
#138627#5
Date:
2002-03-14 19:40:16 UTC
From:
To:
Package: man-db
Version: 2.3.20-15
Severity: normal

Hi,

The problem is that "man -k" reports affirmatively on a
de-installed program, and then reports negatively (correctly so)
with the next "man -k" invocation for the same program.

Here is a typescript, the false positive is for mpack(1) at !1,
the correct negatives are at !2 to !6,

    1 $ man -k mime
    MIME (1) [mime]      - Multipurpose Internet Mail Extensions
    dh_installmime (1)   - install mime files into package build directories
    magic2mime (1)       - determine file type
    mime (1)             - Multipurpose Internet Mail Extensions
    mimeit (1)           - base64-encode stdin and mail it
    mimencode (1)        - Translate to and from mail-oriented encoding formats
    mpack (1)            - pack a file in MIME format
    smime (1ssl)         - S/MIME utility
    splitmail (1)        - Split a large mail message into MIME-compliant partial messages
    update-mime (8)      - create or update MIME information

    2 $ man mpack
    No manual entry for mpack

    3 $ man -wa mpack
    No manual entry for mpack

    4 $ apropos mpack
    mpack: nothing appropriate.
    --> exit status 16

    5 $ man -k mpack
    mpack: nothing appropriate.

    6 $ man -k mime
    MIME (1) [mime]      - Multipurpose Internet Mail Extensions
    dh_installmime (1)   - install mime files into package build directories
    magic2mime (1)       - determine file type
    mime (1)             - Multipurpose Internet Mail Extensions
    mimeit (1)           - base64-encode stdin and mail it
    mimencode (1)        - Translate to and from mail-oriented encoding formats
    smime (1ssl)         - S/MIME utility
    splitmail (1)        - Split a large mail message into MIME-compliant partial messages
    update-mime (8)      - create or update MIME information

I use anacron to keep the man-db databases up to date.  I don't
remember exactly when I had last installed and then de-installed
"mpack", but it was quite some time ago, a good guess is around
Feb 19, 2002.

For what it's worth, here is an "ls -l" type listing of man-db's
index files as of today, the above typescript was saved from two
days ago,

    -rw-r--r-- 1 man  root 188416 Mar 14 09:49 /var/cache/man/X11R6/index.bt
    -rw-r--r-- 1 man  root   8192 Feb 25 09:20 /var/cache/man/fsstnd/index.bt
    -rw-r--r-- 1 man  root   8192 Jun  5  2001 /var/cache/man/local/index.bt
    -rw-r--r-- 1 man  root   8192 Mar 14 09:49 /var/cache/man/oldlocal/index.bt
    -rw-r--r-- 1 man  root   8192 Mar 14 09:49 /var/cache/man/opt/index.bt

Thanks,

#138627#10
Date:
2002-03-17 04:41:07 UTC
From:
To:
'man -k' just execs apropos, which runs with dropped privileges and
can't modify the database, so it's actually the 'man mpack' in between
(or possibly the 'man -wa mpack) which is noticing that that database
entry is stale and so removing it.

It might be a good idea to make apropos a bit more intelligent about
this sort of thing, but it'll require some restructuring. See also
#133917.

Thanks,