Issues with reading ncurses man pages

Denys Vlasenko vda.linux at googlemail.com
Wed Mar 10 16:14:38 UTC 2021


On Sun, Feb 7, 2021 at 3:49 AM depsterr <depsterr at protonmail.com> wrote:
>
> Hi, I'm trying to open some ncurses man pages in busybox man, however it's not possible as these files are suffixed .3x instead of .3 (even though they're in section 3).
>
> Currently busybox man assumes the man page will have the same "title" as the section, meaning files with the suffix .3x cannot be found in section man3. This could either be fixed by only matching names until the suffix (thought this could be hard to do since file names may end in .3.bz2 and might have a . in the page name, such as mkfs.ext4) or match SECTIONx as well.
>
> It is also worth mentioning man-db opens these man pages without an issue.

Hmmm... I see the same thing.
Also, "man -w 3 ncurses" and  "man -w 3x ncurses"
both find the same file, /usr/share/man/man3/ncurses.3x.gz
"man -w 2 ncurses" does not find it.

Which means that sections are not really matched 1:1 to manEXT
directories, nor to manpage.EXT[.gz] filenames.

man-db seems to read the entire directories
instead of probing filenames as we do.

IOW: it scans /usr/share/man for all man3ANYTHING directories,
and then scans them for ncurses.3ANYTHING2[.gz]

There's more to it.
"man -w 3z ncurses" does not find /usr/share/man/man3z/ncurses.3.gz
but finds /usr/share/man/man3z/ncurses.3zzzz.gz

So, I'm not even clear on what are the match rules, exactly...


More information about the busybox mailing list