← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~lamont/launchpad/lp-buildd-66 into lp:launchpad/devel

 

LaMont Jones has proposed merging lp:~lamont/launchpad/lp-buildd-66 into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)


rev 66 of launchpad-buildd, as deployed
-- 
https://code.launchpad.net/~lamont/launchpad/lp-buildd-66/+merge/30315
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~lamont/launchpad/lp-buildd-66 into lp:launchpad/devel.
=== modified file 'lib/canonical/buildd/debian/changelog'
--- lib/canonical/buildd/debian/changelog	2010-07-08 11:04:57 +0000
+++ lib/canonical/buildd/debian/changelog	2010-07-19 18:21:45 +0000
@@ -1,3 +1,9 @@
+launchpad-buildd (66) hardy-cat; urgency=low
+
+  * handle [linux-any] build-dependencies.  LP#604981
+
+ -- LaMont Jones <lamont@xxxxxxxxxxxxx>  Mon, 19 Jul 2010 12:13:31 -0600
+
 launchpad-buildd (65) hardy-cat; urgency=low
 
   * Drop preinst check, since human time does not scale across a large

=== modified file 'lib/canonical/buildd/sbuild'
--- lib/canonical/buildd/sbuild	2009-12-15 00:19:56 +0000
+++ lib/canonical/buildd/sbuild	2010-07-19 18:21:45 +0000
@@ -905,10 +905,18 @@
 		print PLOG "$dscbase has no Architecture: field -- skipping arch check!\n";
 	}
 	else {
-		if ($dscarchs ne "any" && $dscarchs !~ /\b$main::arch\b/ &&
+		my $valid_arch;
+		for my $a (split(/\s+/, $dscarchs)) {
+			if (system('dpkg-architecture', '-a' . $main::arch, '-i' . $a) eq 0) {
+				$valid_arch = 1;
+				last;
+			}
+		}
+		if ($dscarchs ne "any" && !($valid_arch) &&
 		    !($dscarchs eq "all" && $main::build_arch_all) ) {
-			print PLOG "$dscbase: $main::arch not in arch list: $dscarchs -- ".
-				 "skipping\n";
+			my $msg = "$dscbase: $main::arch not in arch list or does not match any arch ";
+			$msg .= "wildcards: $dscarchs -- skipping\n";
+			print PLOG $msg;
 			$main::pkg_fail_stage = "arch-check";
 			return( "ERROR", @made );
 		}
@@ -2788,11 +2796,13 @@
 				my @archs = split( /\s+/, $archlist );
 				my ($use_it, $ignore_it, $include) = (0, 0, 0);
 				foreach (@archs) {
+					# Use 'dpkg-architecture' to support architecture
+					# wildcards.
 					if (/^!/) {
-						$ignore_it = 1 if substr($_, 1) eq $main::arch;
+						$ignore_it = 1 if system('dpkg-architecture', '-a' . $main::arch, '-i' . substr($_, 1)) eq 0;
 					}
 					else {
-						$use_it = 1 if $_ eq $main::arch;
+						$use_it = 1 if system('dpkg-architecture', '-a' . $main::arch, '-i' . $_) eq 0;
 						$include = 1;
 					}
 				}