Comment 5 for bug 645147

Revision history for this message
Steve Langasek (vorlon) wrote :

 foreach my $dep (@dependencies)
 {
        $dep =~ s/^ //;
+ my $archlisted=1;
+ # if there is an arch specifier then honour it when making deps list
+ if ($dep =~ /\[(.*)\]/) {
+ $archlisted=0;
+ my @archspec=split(/ /, $1);
+ foreach my $arch (@archspec) {
+ if ($arch eq $hostarch) { $archlisted=1; last }
+ }
+ next unless $archlisted;
+ };
        @bits=split(/ /, $dep);
        push @aptlist, $bits[0];
 }

This is an incomplete fix; it misses the architecture wildcards that are now supported as of Debian Policy 3.9.1 (Section 7.1 of Policy), and these wildcards are starting to be used in the wild. This change is still a net improvement so I don't think we should block on a fully correct fix, but please open a separate bug to track the incomplete handling of arch-specific build-deps.