X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_installman;h=6dbafb820d9baf20aa7f56bfd1b8fb3febd79486;hb=d66f0f08bda3d1eade4cf82f16fe7b8e539a6995;hp=f054796ceabaaaee533cfa4d9e02e9e0fd034c55;hpb=e676533cd7e894251d935224e24abcccaf164aaa;p=debhelper.git diff --git a/dh_installman b/dh_installman index f054796..6dbafb8 100755 --- a/dh_installman +++ b/dh_installman @@ -143,19 +143,19 @@ foreach my $package (@{$dh{DOPACKAGES}}) { my $destdir="$tmp/usr/share/man/man$realsection/"; my $langcode; - if (! exists $dh{LANGUAGE}) { + 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)/; - if (defined $langcode && $langcode ne '') { - # Strip the language code from the instname. - $instname=~s/\.$langcode$//; - } } elsif ($dh{LANGUAGE} ne 'C') { $langcode=$dh{LANGUAGE}; - ($instname)=$basename=~m/(.*?)\./; + } + + if (defined $langcode && $langcode ne '') { + # Strip the language code from the instname. + $instname=~s/\.$langcode$//; } if (defined $langcode && $langcode ne '') { @@ -163,14 +163,14 @@ foreach my $package (@{$dh{DOPACKAGES}}) { } $destdir=~tr:/:/:s; # just for looks - if (! -e "$destdir/$instname.$section" && - ! -l "$destdir/$instname.$section") { - if (! -d $destdir) { - doit "install","-d",$destdir; - } - doit "install","-p","-m644",$page, - "$destdir$instname.$section$gz"; + next if -l "$destdir/$instname.$section"; + next if compat(5) && -e "$destdir/$instname.$section"; + + if (! -d $destdir) { + doit "install","-d",$destdir; } + doit "install","-p","-m644",$page, + "$destdir$instname.$section$gz"; } @@ -205,6 +205,11 @@ sub find_so_man { } my $l=; close SOTEST; + + if (! defined $l) { + error("failed to read $_"); + } + if ($l=~m/\.so\s+(.*)\s*/) { my $solink=$1; # This test is here to prevent links like ... man8/../man8/foo.8