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

Translated manual pages & dh_installman behaviour


the commit d7c001aa6b3d49f1542df05cde60406be2e981ec did not work out as

    Stop using brace expansion to install man pages
    The reason for using brace expansion in the first place was due to
    debhelper starting to abort on empty glob expansion, needed because
    translated man pages might not be present if not complete enough.
    The installation is now handled by dh_installman which does not abort
    on empty glob expansion (and in fairness should have been handling
    the installation from the beginning). While the result is clearly a
    regression in readability and maintainability it's certainly less ugly
    than an executable debhelper config file, it also does not require
    bumping debhelper Build-Depends to 8.9.12.

Since then, the translated manual pages are no longer properly installed in the
packages. That's because dh_installman is unable to identify the language code
from the path and thus installs them in the main directory. We did not notice
it immediately because the english one is always installed last and thus
overwrites any translated manual page that was installed at the wrong place.

dh_installman only supports extracting the language code from the basename (aka
name.<lang>.<section>) or taking it from the command line.

Joey, would it be possible to also extract the language code from the
path when the dirname matches m{/man/([a-z][a-z](?:_[A-Z][A-Z])?)/man\d$} ?

It's specific enough to avoid wrong guesses and it seems to make sense
when you want to use dh_installman to install manual pages taken out of
debian/tmp as is the case here:
$ head -n 4 debian/dpkg.manpages 

Joey, please tell me if you want a wishlist bug report for this.

Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/

Reply to: