Hi Branden, Colin, On 12/9/22 21:37, G. Branden Robinson wrote:
Hi Alex, At 2022-12-09T19:53:44+0100, Alejandro Colomar wrote:Could you remove these duplicates in your next upload? I found the following duplicates, I did not do an extensive search: =================================================================== rindex - Both in index.3 and in string.3 strncasecmp - Both in strcasecmp.3 and in string.3 strncat - Both in strcat.3 and in string.3 strncmp - Both in strcmp.3 and in string.3 strncpy - Both in strcpy.3 and in string.3 __fpurge - Both in fpurge.3 and in stdio_ext.3 strcspn - Both in strspn.3 and in string.3 strrchr - Both in strchr.3 and in string.3 pselect - Both in select.2 and in select_tut.2Could you please confirm if this is a bug in the Linux man-pages, or is it something desirable?I don't think it is a bug for multiple pages to have a mandb entry for the same name. The man(1) librarian is designed in expectation of that; we have both printf(1) and printf(3), after all.I find it a bit weird that we need to specify a NAME only once.There is no such need, and it would be impossible to enforce across projects anyway.Then whatis(1) will not find the other pages that also talk about an interface (of course, ideally, only a page would describe an interface, but we know that's not reality).apropos(1) and whatis(1) do indeed behave in a way that surprises me on my Debian system (man-db 2.9.4-2). I would have expected multiple results. What I expected: $ whatis rindex rindex (3) - locate character in string string (3) - string operations [...and maybe others I haven't thought of] What I got: rindex (3) - locate character in string I am not sure why further matches are being hidden. "apropos" (synonym: "man -k") searches the page topics _and_ summary descriptions, while "whatis" (synonym: "man -f") searches only the topics. However, given the string(3) page: .SH NAME stpcpy, strcasecmp, strcat, strchr, strcmp, strcoll, strcpy, strcspn, strdup, strfry, strlen, strncat, strncmp, strncpy, strncasecmp, strpbrk, strrchr, strsep, strspn, strstr, strtok, strxfrm, index, rindex \- string operations I don't see why "rindex" isn't treated as a match for "rindex". "index", "strcoll", and "stpcpy" aren't either, so the position in the topic list doesn't seem to matter. I don't see anything ill-formed about the man pages in question, so I can only assume this is either a man-db bug or an aspect of its behavior that I don't understand. But man-db's man(1) page suggests that my expectations are correct. --snip-- man -k printf Search the short descriptions and manual page names for the keyword printf as regular expression. Print out any matches. Equivalent to apropos printf. man -f smail Lookup the manual pages referenced by smail and print out the short descriptions of any found. Equivalent to whatis smail. --snip-- Note the plurals. So I will punt to Colin Watson here.
Hmm, now you say it, I noticed recently that problem too. Every now and then, I try to open a page, and some of the link pages that I had in the past that was later moved to a subsection bites me. Since 'make uninstall' doesn't remove pages not present in the source code, I can't remove them (at least not easily). When I try to see all pages available with a name, I can't find them.
I would swear that in the past I could see them all, and it's since last half year or year that I only see one page. There may be a bug in man-db...
Cheers, Alex -- <http://www.alejandro-colomar.es/>
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature