Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 159192
Alias:
Product:
Component:
Status: NEW
Resolution:
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Gautam Iyer <gi1242@users.sourceforge.net>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 159192 depends on: Show dependency tree
Bug 159192 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.








View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-12-27 01:07 0000
Hi,

The "whatis" database on my system is horribly incomplete. For instance

    whatis gcc

returns "Nothing appropriate".

The problem is as follows

    1. The first line of /usr/sbin/makewhatis is NOT "#!/bin/sh"

    2. The /etc/cron.weekly/makewhatis cronjob executes

        makewhatis -u

       This won't work! Looking at the source code, makewhatis -u only adds man
pages that were modified in the last 24 hours. Thus running makewhatis -u on a
*weekly* basis is fundamentally flawed!

I suggest that you

    1. Add "#!/bin/sh" to the top of /usr/sbin/makewhatis

    2. Move the weekly cronjob to a daily one. (I further recommend running
"makewhatis -u -w" instead of just "makewhatis -u" as is currently done).

    3. Add a monthly (or weekly) cronjob to completely regenerate the whatis
database, so as to remove outdated entries, and add possibly missing entries.
This can be done by putting the lines

        #! /bin/sh
        exec nice /usr/sbin/makewhatis -w

       in /etc/cron.monthly/makewhatis

The man & whatis database is extremely useful. Please fix it (as suggested
above),

Thanks,

GI

------- Comment #1 From SpanKY 2006-12-27 07:23:51 0000 -------
(1) doesnt matter at all, the kernel will properly execute the file as a shell
script

------- Comment #2 From Gautam Iyer 2006-12-27 12:49:10 0000 -------
(In reply to comment #1)
> (1) doesnt matter at all, the kernel will properly execute the file as a shell
> script

Actually, (1) gave me trouble on my system (probably because the shell root
uses is tcsh). Before doing (1), running makewhatis gave 

    program=makewhatis: Command not found.
    dm=: Command not found.
    for: Command not found.
    do: Command not found.
    d: Undefined variable.

Problems went away after (1).

GI

------- Comment #3 From SpanKY 2007-01-05 17:34:20 0000 -------
#!shebang handling has been fixed and sent upstream

------- Comment #4 From Gautam Iyer 2007-01-06 20:20:12 0000 -------
1. I noticed that makewhatis.cron still runs "makewhatis -u", and not
"makewhatis -u -w". On my system omiting the -w causes makewhatis to not index
Qt3, and some gcc man pages.

2. You still don't COMPLETELY REBUILD the whatis database frequently. If you
don't you could miss a lot of man pages. For example, user installs foo, and
turns off his computer BEFORE the daily cron job has run. He turns on the
computer again two days later. When the daily cron job runs, it will NOT index
man pages of foo.

If you want to fix the problem, you should run "makewhatis -w" every month (or
every day), and "makewhatis -u -w" every day. Just running "makewhatis -u"
every day is flawed, and almost pointless.

The ideal solution will be for makewhatis to store it's last run time, so that
running "makewhatis -u -w" every day will generate the index correctly...

GI

------- Comment #5 From SpanKY 2007-01-07 01:35:13 0000 -------
that's funny, i dont recall saying i did anything other than changing the
shebang in the file ... so why are you telling me things i already know ?

as for adding -w, i dont see the point ... makewhatis already has the same
logic as `man --path`

------- Comment #6 From Gautam Iyer 2007-01-07 03:00:44 0000 -------
(In reply to comment #5)
> that's funny, i dont recall saying i did anything other than changing the
> shebang in the file ... so why are you telling me things i already know ?

Lol. I just emerge --synced, and saw your fixes. For some reason I assumed that
your message meant you were "done with it". That of course set me panicking
because its still broken on my system ...

> as for adding -w, i dont see the point ... makewhatis already has the same
> logic as `man --path`

Strangely it doesn't seem to work that way on my system. When I add a -v too,
it only looks in /usr/share/man and /usr/local/man. Adding -w makes it look in
all the other directories too ...

Thanks for fixing it :)

GI

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug