]> git.donarmstrong.com Git - debhelper.git/commitdiff
Further reduce the number of calls to dpkg-architecture to zero, in a typical package...
authorJoey Hess <joey@kitenet.net>
Sun, 9 May 2010 16:21:12 +0000 (12:21 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 9 May 2010 16:21:12 +0000 (12:21 -0400)
Debian/Debhelper/Dh_Lib.pm
debian/changelog

index 155184be218bfe7266ba0ad60a935c97aec477d1..09ec0b14fce358c26c4e69d008e2fb8c560e021d 100644 (file)
@@ -364,9 +364,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";
        }
index aea7bfc805e95ef4ead6845ac94d18b1a6c91ba4..4eae23a252b5a8a0d72eca09beb1a717434acac4 100644 (file)
@@ -2,6 +2,9 @@ debhelper (7.4.20) UNRELEASED; urgency=low
 
   * Drop one more call to dpkg-architecture. Closes: #580837
     (Raphael Geissert)
+  * Further reduce the number of calls to dpkg-architecture to zero,
+    in a typical package with no explicit architecture mentions
+    in control file or debhelper config files.
 
  -- Joey Hess <joeyh@debian.org>  Sun, 09 May 2010 11:44:58 -0400