On Thu, Sep 28, 2006 at 12:08:38AM +0900, KISE Hiroshi wrote: > case 1: installed manpages-dev and manpages-ja-dev, not installed > manpages-posix-dev > > $ LANG=ja_JP.UTF-8 man -a -w select > /usr/share/man/man2/select.2.gz > /usr/share/man/ja/man2/select.2.gz > /usr/share/man/man2/select.2.gz > $ LANG=ja_JP.UTF-8 man -w select > /usr/share/man/man2/select.2.gz > > It's incorrect. I expected result "/usr/share/man/ja/man2/select.2.gz".
This particular instance of the problem is not reproducible any more, but I think the underlying bug is still present. man processes the manpath twice (at least if you use -a). In the first phase, it looks in the filesystem; in the second phase, it looks in its database. In each phase it looks through the possible sections and tries to determine which pages are preferable. 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. Thanks, -- Colin Watson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]