From: Alejandro Colomar <alx.manpages@gmail.com>
To: Colin Watson <cjwatson@debian.org>, man-db-devel@nongnu.org
Cc: linux-man <linux-man@vger.kernel.org>
Subject: man -K finds repeated entries for each symlink page
Date: Sun, 9 Apr 2023 15:58:28 +0200 [thread overview]
Message-ID: <a93419ac-b06a-41d3-7c82-339f1773ee76@gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1359 bytes --]
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2023-04-09 13:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-09 13:58 Alejandro Colomar [this message]
2023-04-09 14:55 ` man -K finds repeated entries for each symlink page Colin Watson
2023-04-09 15:20 ` Poor performance of man -K for uncompressed pages (was: man -K finds repeated entries for each symlink page) Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a93419ac-b06a-41d3-7c82-339f1773ee76@gmail.com \
--to=alx.manpages@gmail.com \
--cc=cjwatson@debian.org \
--cc=linux-man@vger.kernel.org \
--cc=man-db-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox