Package: debhelper Version: 5.0.35 Tags: patch Severity: wishlist Hi,
As discussed in the Embedded Workshop in Extremadura, here's the patch to support the new architecture wildcard, which allows to use stuff like 'linux-any' or 'any-i386' in the Architecture field when using the -s flag for the debhelper scripts. regards, guillem
diff -Naur debhelper-5.0.30.orig/Debian/Debhelper/Dh_Lib.pm debhelper-5.0.30/Debian/Debhelper/Dh_Lib.pm --- debhelper-5.0.30.orig/Debian/Debhelper/Dh_Lib.pm 2006-03-23 02:32:21.000000000 +0200 +++ debhelper-5.0.30/Debian/Debhelper/Dh_Lib.pm 2006-04-15 23:47:14.000000000 +0300 @@ -559,6 +559,18 @@ } } +# Passed an arch and a list of arches to match against, returns true if matched +sub samearch { + my $arch=shift; + my @archlist=split(/\s+/,shift); + + foreach my $a (@archlist) { + system("dpkg-architecture", "-a$arch", "-i$a") == 0 && return 1; + } + + return 0; +} + # Returns a list of packages in the control file. # Must pass "arch" or "indep" or "same" to specify arch-dependant or # -independant or same arch packages. If nothing is specified, returns all @@ -616,7 +628,7 @@ if ($package && (($type eq 'indep' && $arch eq 'all') || ($type eq 'arch' && $arch ne 'all') || - ($type eq 'same' && ($arch eq 'any' || $arch =~ /(^|\s)$buildarch(\s|$)/)) || + ($type eq 'same' && ($arch eq 'any' || samearch($buildarch, $arch) || ! $type)) { push @list, $package; $package="";