summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-09 12:21:12 -0400
committerJoey Hess <joey@kitenet.net>2010-05-09 12:21:12 -0400
commitccbde27ebd7562d540cf525c877ca996acc61318 (patch)
treeaca6bba8af6c809487723e6f82403618428f1c48
parent5cee909d876bacad4f3d0e092d69fe0bfee6e083 (diff)
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.
-rw-r--r--Debian/Debhelper/Dh_Lib.pm20
-rw-r--r--debian/changelog3
2 files changed, 20 insertions, 3 deletions
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 155184be..09ec0b14 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -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";
}
diff --git a/debian/changelog b/debian/changelog
index aea7bfc8..4eae23a2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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