Mail archive
alpine-user

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

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

Hi,

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.
https://pkgs.alpinelinux.org/contents?file=scandir.*&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

and

/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:
https://git.alpinelinux.org/cgit/aports/tree/main/man-pages/APKBUILD?id=eb6c8019412e3e5dbcb4112b33f4f89a8ec73dcb#n19
) ?


++ (just an experiment)
# pwd
/usr/share/man
# 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:
https://pkgs.alpinelinux.org/contents?file=*.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?
https://git.alpinelinux.org/cgit/aports/tree/main/mdocml/pager.patch?id=ae43f02b3cdfb0f944bf352fa81911324ec594fb#n16


+++ 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].

[1]: http://www.greenwoodsoftware.com/less/
[2]: https://github.com/gdamore/less-fork
[3]: https://pkgs.alpinelinux.org/contents
[4]: https://crux.nu/doc/prt-get%20-%20User%20Manual.html#info_fsearch


Thanks.


-- 
https://www.juef.space/






---
Unsubscribe:  alpine-user+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-user+help_at_lists.alpinelinux.org
---
Received on Fri Feb 02 2018 - 17:22:33 UTC