Mail archive

[alpine-user] can't open a specific manual if there are multiple almost identical fnames

From: Svyatoslav Mishyn <>
Date: Fri, 2 Feb 2018 17:22:33 +0200


just noticed by accident that cannot open in Alpine Linux some manuals
e.g. scandir(3).

I've installed 'man-pages' package which contains for some manuals two
versions: POSIX and Linux
(e.g.*&path=&name=man-pages&branch=edge&arch=x86_64 )
and installs them into the same subdir.

Then checked mandocdb that scandir(3) is there (also why are there
double slashes?).
/home/juef: sudo /usr/sbin/makewhatis -D -a -T utf8 /usr/share/man 2>&1 | grep scandir
/usr/share/man//man3/scandir.3.gz: Adding to database
/usr/share/man//man3/scandir.3p: Adding to database

(I've slightly modified mandoc (against CVS HEAD) to see a bit more.)

/home/juef/cvs/mandoc: ./man 3 scandir
sec: /usr/share/man/man3/scandir.3p
prio: 5; sec: 3/scandir.3p
resp->file: /usr/share/man/man3/scandir.3p
sec: /usr/share/man/man3/scandir.3.gz
prio: 5; sec: 3/scandir.3.gz
sec: /usr/share/man/man3/alphasort.3p
prio: 5; sec: 3/alphasort.3p


/home/juef/cvs/mandoc: ./man 3p scandir
sec: /usr/share/man/man3/scandir.3p
prio: 5; sec: 3/scandir.3p
resp->file: /usr/share/man/man3/scandir.3p
sec: /usr/share/man/man3/alphasort.3p
prio: 5; sec: 3/alphasort.3p

So, mandoc in that case always opens /usr/share/man/man3/scandir.3p
regardless of the section option.

Should mandoc handle such case?
Or should 'man-pages' package be fixed
(i.e. install POSIX manuals in man[0-3]p subdirs, by removing this block:
) ?

++ (just an experiment)
# pwd
# mkdir mann
# mv man3/scandir.3.gz mann
# /usr/sbin/makewhatis -D -a -T utf8 /usr/share/man

now, `man n scandir`, opens /usr/share/man/mann/scandir.3.gz
So, doesn't mandoc look at the file extention to determine its section?

BTW, POSIX manuals are not gzipped, see for example 3p section:*.3p&path=&name=man-pages&branch=edge&arch=x86_64

Also, is it possible to not apply less-specific patch if the less[1],
or less-fork[2] was installed beforehand?

+++ Is there a possibility in apk to make a local search
by the file names for all packages including not installed?
Similar what web-interface[3] can do or CRUX's prt-get[4].




Received on Fri Feb 02 2018 - 17:22:33 UTC