[debhelper-devel] [debhelper] 10/17: dh_installman: Fix bug in the c11 language handling
Niels Thykier
nthykier at moszumanska.debian.org
Thu Jun 29 15:49:20 UTC 2017
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit eea3821116074328fb10d587cbb6f1284bc03b23
Author: Niels Thykier <niels at thykier.net>
Date: Thu Jun 29 08:28:06 2017 +0000
dh_installman: Fix bug in the c11 language handling
It overrode explicitly defined languages (--language) but not the
"faulty" detection it was supposed to replace.
Signed-off-by: Niels Thykier <niels at thykier.net>
---
dh_installman | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/dh_installman b/dh_installman
index 37ffe04..b931b0e 100755
--- a/dh_installman
+++ b/dh_installman
@@ -210,12 +210,16 @@ on_items_in_parallel(\@all_packages, sub {
my $destdir = "$tmp/usr/share/man/man$realsection/";
my $langcode;
if (!defined $dh{LANGUAGE} || !exists $dh{LANGUAGE}) {
- # Translated man pages are typically specified by adding the
- # language code to the filename, so detect that and
- # redirect to appropriate directory, stripping the code.
- ($langcode) = $basename =~ m/\.([a-z][a-z](?:_[A-Z][A-Z])?)\.(?:[1-9]|man)/;
- } elsif (not compat(10) and $page =~ m{/man/(?:([a-z][a-z](?:_[A-Z][A-Z])?)(?:\.[^/]+)?)?/man[1-9]/}) {
- $langcode = $1;
+ if (not compat(10) and $page =~ m{/man/(?:([a-z][a-z](?:_[A-Z][A-Z])?)(?:\.[^/]+)?)?/man[1-9]/}) {
+ # If it looks like it was installed in a proper man dir, assume the language
+ # from that is correct.
+ $langcode = $1;
+ } else {
+ # Translated man pages are typically specified by adding the
+ # language code to the filename, so detect that and
+ # redirect to appropriate directory, stripping the code.
+ ($langcode) = $basename =~ m/\.([a-z][a-z](?:_[A-Z][A-Z])?)\.(?:[1-9]|man)/;
+ }
} elsif ($dh{LANGUAGE} ne 'C') {
$langcode = $dh{LANGUAGE};
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list