I've attached a patch that will implement support for architecture wildcards in 
wanna-build.

This I think is the only change needed to support wildcards, although I wasn't 
able to test it. In Database.pm, parse_sources() only checks whether the 
architecture listed is 'all', so dpkg-architecture wouldn't be of any use in 
this case. For parse_packages(), a Packages file that is scanned never has any 
architecture wildcards AFAIN, so there's no need for dpkg-architecture in this 
case either.

-- 
Regards,
Andres
diff --git a/lib/WannaBuild/Database.pm b/lib/WannaBuild/Database.pm
index 8f63124..cde9e41 100644
--- a/lib/WannaBuild/Database.pm
+++ b/lib/WannaBuild/Database.pm
@@ -2088,10 +2088,15 @@ sub parse_srcdeplist {
             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 $arch;
-                } else {
-                    $use_it = 1 if $_ eq $arch;
+                    $ignore_it = 1 if system($Sbuild::Sysconfig::programs{'DPKG_ARCHITECTURE'},
+                        '-a' . $arch, '-i' . substr($_, 1)) eq 0;
+                }
+                else {
+                    $use_it = 1 if system($Sbuild::Sysconfig::programs{'DPKG_ARCHITECTURE'},
+                        '-a' . $arch, '-i' . $_) eq 0;
                     $include = 1;
                 }
             }

Reply via email to