Subject: Re: bin/5231: makewhatis does not deal with multiple MANDIR's
To: None <root@polaris.garbled.net>
From: Chris G. Demetriou <cgd@pa.dec.com>
List: netbsd-bugs
Date: 03/30/1998 10:14:09
> There are one of two approaches to this:
> 
> A> Create a large whatis.db file in /usr/share/man and have appropos read that
> one file to find it's information.
> 
> B> Create multiple whatis.db files in the various man roots and have apropos
> search for those.  (our default man.conf allready handles this)
> 
> I like to be able to look up all my pages.. and it doesn't really matter to
> me which method we use.. It's a bit simpler to simply deal with one whatis.db
> file, and the search is probably faster from apropos's point of view than to have
> to open 3-4 different files up.

And approach B is the correct one.  You should only be looking in a
given whatis DB if that manual page hierarchy is supposed to be
searched when you run 'man'.  Assuming that the defaults apply to
everyone (or even that everyone uses a superset of the defaults) is
bogus.

Additionally, your patch keeps people from making whatis.db's from
directories that are _not_ in the path list, or from making
directories' databases one at a time.  Features like these are
especially useful in shared-sofware (NFS mount to get binaries)
environments.


If you want to create multiple whatis.db databases, you can easily do
so:

/usr/libexec/makewhatis /usr/X11R6/man
/usr/libexec/makewhatis /usr/pkg/man

etc.  Works quite nicely.

It might be nice if there were a way to automate generation of these
files, e.g. touch a file to force them to be made, then have the daily
runs make them, if that file exists, and have the package tools touch
the file for the right directories.

However, even without that, you can invoke the right makewhatis
commands from daily or weekly (or monthly 8-), or do it by hand when
installing programs.


There's a problem, or at least an annoyance, here, but it should not
be fixed in the way you suggest.



cgd