man-db-devel
[Top][All Lists]
Advanced

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

man -K finds repeated entries for each symlink page


From: Alejandro Colomar
Subject: man -K finds repeated entries for each symlink page
Date: Sun, 9 Apr 2023 15:58:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1

Hi Colin,

For a reproducer, run the following commands from a clone of the Linux
man-pages repo (although you should be able to reproduce in any Debian
installation, I guess).

$ sudo rm -r /opt/local/man/
$ sudo make install-man2 prefix=/opt/local/man LINK_PAGES=symlink -j | wc -l
503
$ export MANPATH=/opt/local/man/share/man
$ man -Kaw RLIMIT_NOFILE | sort | uniq -c
      3 /opt/local/man/share/man/man2/dup.2
      2 /opt/local/man/share/man/man2/fcntl.2
      5 /opt/local/man/share/man/man2/getrlimit.2
      3 /opt/local/man/share/man/man2/open.2
      1 /opt/local/man/share/man/man2/pidfd_getfd.2
      1 /opt/local/man/share/man/man2/pidfd_open.2
      2 /opt/local/man/share/man/man2/poll.2
      1 /opt/local/man/share/man/man2/seccomp_unotify.2
      4 /opt/local/man/share/man/man2/select.2

Those numbers coincide with 1+ the number of symlinks for each of the
pages.  For example, see select.2:

$ find /opt/local/man/share/man -type l | xargs readlink | grep -c /select.2
3

man(1) found the original page, plus the 3 symlinks.

The solution should be that man(1) ignores link pages for -K, since
looking at the source code of one page won't change the results from
a different page.

Cheers,
Alex

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]