[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How do I make whatis/apropos read entries from custom man pages?



Hi,

$ uname -a
Linux e130 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
$ cat /etc/debian_version
10.2


I have recently installed buster and I am running into problems with custom man pages.

I have a pkgsrc [1] installation with a custom prefix /usr/pkg. Binaries are in /usr/pkg/bin and /usr/pkg/sbin and man pages are in /usr/pkg/man.

Let's say I want to view the manual page of pkgin(1), I can see this page fine. It pulls it correctly from /usr/pkg/man/man1/pkgin.1

However, neither apropos or whatis cannot see it:

$ whatis pkgin
pkgin: nothing appropriate.
$ apropos pkgin
pkgin: nothing appropriate.


In my previous Debian installation, all I did was to add this line to /etc/manpath:
MANDB_MAP    /usr/pkg/man/        /usr/pkg/var/cache/man

and then run `mandb -d` as root, however mandb this time complained that /usr/pkg/var/cache/man could not be created, even if I was root.

So I added this:
MANDB_MAP    /usr/pkg/man/              /var/cache/man/pkg

and run `mandb -d`` but the neither whatis nor apropos can read from /var/cache/man/pkg. I've tried both as root and single user to no avail.

I have also added:
MANDATORY_MANPATH                       /usr/pkg/man

and:
MANPATH_MAP     /usr/pkg/bin            /usr/pkg/man
MANPATH_MAP     /usr/pkg/sbin           /usr/pkg/man

and run:
# mandb -d
# mandb -c

and it looks like the catdirs are created:

$ ls -al /var/cache/man/pkg/
total 1716
drwxr-xr-x  7 man man    4096 Mar 22 12:44 .
drwxr-xr-x 37 man man    4096 Mar 22 12:44 ..
-rw-r--r--  1 man man     190 Mar 22 12:00 CACHEDIR.TAG
drwxr-xr-x  2 man man    4096 Mar 22 11:56 cat1
drwxr-xr-x  2 man man    4096 Mar 22 11:56 cat3
drwxr-xr-x  2 man man    4096 Mar 22 11:56 cat5
drwxr-xr-x  2 man man    4096 Mar 22 11:56 cat7
drwxr-xr-x  2 man man    4096 Mar 22 11:56 cat8
-rw-r--r--  1 man man 1724416 Mar 22 12:01 index.db


 but still to no avail for whatis/apropos.

My full /etc/manpath.conf is here:
https://paste.debian.net/hidden/06f37279/

Any help will be appreciated.

[1] http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/doc/pkgsrc.html


--
Ottavio Caruso




Reply to: