X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debian%2FDebhelper%2FDh_Lib.pm;h=fb83480b5324b69182c26fcc2e17587e1678332b;hb=7bc99d44cfc0275e1b44b390bed1362c457da9ab;hp=155184be218bfe7266ba0ad60a935c97aec477d1;hpb=5cee909d876bacad4f3d0e092d69fe0bfee6e083;p=debhelper.git diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index 155184b..fb83480 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -19,7 +19,7 @@ use vars qw(@ISA @EXPORT %dh); &sourcepackage &is_make_jobserver_unavailable &clean_jobserver_makeflags); -my $max_compat=7; +my $max_compat=8; sub init { my %params=@_; @@ -125,6 +125,8 @@ sub write_log { my $cmd=shift; my @packages=@_; + return if defined $ENV{DH_INHIBIT_LOG} && $cmd eq $ENV{DH_INHIBIT_LOG}; + foreach my $package (@packages) { my $ext=pkgext($package); my $log="debian/${ext}debhelper.log"; @@ -215,6 +217,7 @@ sub xargs { # The kernel can accept command lines up to 20k worth of characters. my $command_max=20000; # LINUX SPECIFIC!! + # (And obsolete; it's bigger now.) # I could use POSIX::ARG_MAX, but that would be slow. # Figure out length of static portion of command. @@ -364,9 +367,23 @@ sub pkgfile { $filename="$dh{NAME}.$filename"; } - my @try=("debian/$package.$filename.".buildarch(), - "debian/$package.$filename.".buildos(), - "debian/$package.$filename"); + # First, check for files ending in buildarch and buildos. + my $match; + foreach my $file (glob("debian/$package.$filename.*")) { + next if ! -f $file; + next if $dh{IGNORE} && exists $dh{IGNORE}->{$file}; + if ($file eq "debian/$package.$filename.".buildarch()) { + $match=$file; + # buildarch files are used in preference to buildos files. + last; + } + elsif ($file eq "debian/$package.$filename.".buildos()) { + $match=$file; + } + } + return $match if defined $match; + + my @try=("debian/$package.$filename"); if ($package eq $dh{MAINPACKAGE}) { push @try, "debian/$filename"; }