tags 389762 fixed-upstream thanks On Wed, Dec 03, 2008 at 12:35:58PM +0000, Colin Watson wrote: > The case of select is somewhat confusing. There's an ordinary page in > section 2 (both for English and Japanese), which is straightforward. If > you install manpages-posix-dev then there's also an ordinary page in > section 3 with extension posix. However, manpages-dev installs links to > select(2) as both FD_ZERO(2) and FD_ZERO(3) (I don't know why), and the > section 3 version is spotted when doing a database lookup. This is why > you get the duplication of /usr/share/man/man2/select.2.gz - at the > level where man is checking for duplicate candidates, it sees that > they're in different sections and therefore distinct, but it hasn't > realised that the section 3 page is actually a symlink into section 2. > > As of man-db 2.5.0, there are databases for non-English hierarchies as > well, and I think this has papered over the problem because the bizarre > section 3 page shows up for Japanese as well. However, the fact that the > duplication isn't noticed and the fact that the whole list isn't > properly sorted are still bugs. > > For my own reference: it would probably be best to fix the sorting > first, since I have a good reproduction case here.
I've now fixed this for the next upstream release (man-db 2.5.4). On my system, the bug showed up as follows: $ man -aw select /usr/share/man/man2/select.2.gz /usr/share/man/man2/select.2.gz /usr/share/man/man3/select.3posix.gz $ LC_ALL=ja_JP.UTF-8 man -aw select /usr/share/man/ja/man2/select.2.gz /usr/share/man/man2/select.2.gz /usr/share/man/ja/man2/select.2.gz /usr/share/man/man2/select.2.gz /usr/share/man/man3/select.3posix.gz The corrected version behaves as follows instead: $ src/man -aw select /usr/share/man/man2/select.2.gz /usr/share/man/man3/select.3posix.gz $ LC_ALL=ja_JP.UTF-8 src/man -aw select /usr/share/man/ja/man2/select.2.gz /usr/share/man/man2/select.2.gz /usr/share/man/man3/select.3posix.gz Mon Dec 8 10:08:45 GMT 2008 Colin Watson <[EMAIL PROTECTED]> Improve sorting and de-duplication of manual page candidates (Debian bug #389762). * src/man.c (struct candidate): Add ult member. (duplicate_candidates): Pare down to only check for duplication rather than trying to compare as well; the latter function is now handled entirely by compare_candidates. Compare the ultimate source file as the first test. (compare_candidates): Compare locale elements in candidate paths before comparing sections. (add_candidates): Look up the ultimate source file if necessary, and save it in the candidate structure. Use duplicate_candidates for duplicate testing only and compare_candidates for comparison. Insert elements at the latest possible position rather than the earliest possible. (try_section): Pass the ultimate source file that was already looked up here. (try_db): Adjust for new add_candidate signature. Thanks for helping to improve man-db! -- Colin Watson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]