Fix which_deb handling of non-Linux arches

When which_deb finds "*i386" or "*amd64" entries in the ARCHES list,
it will wrongly change them to "i386" to "amd64" respectively (which
is wrong in the case of kfreebsd-* or hurd-*).

Make the same changes here that were already made to identical code in
generate_di_list, to fix #758512 (commits
771f754516 and
2ef5d3288c).
This commit is contained in:
Steven Chamberlain 2017-04-12 17:19:28 +01:00 committed by Steve McIntyre
parent 9b0dff8c62
commit 252ea99fdc
1 changed files with 3 additions and 3 deletions

View File

@ -29,9 +29,9 @@ if (!defined ($output)) {
# Give preference to i386 and amd64, if specified
my @ARCHES;
if ( $ENV{ARCHES} ) {
push @ARCHES, 'i386' if $ENV{ARCHES} =~ /i386/;
push @ARCHES, 'amd64' if $ENV{ARCHES} =~ /amd64/;
push @ARCHES, grep { !/source|i386|amd64/ } split /\s+/, $ENV{ARCHES};
push @ARCHES, 'i386' if $ENV{ARCHES} =~ /(^|\s)i386(\s|$)/;
push @ARCHES, 'amd64' if $ENV{ARCHES} =~ /(^|\s)amd64(\s|$)/;
push @ARCHES, grep { !/^(source|i386|amd64)$/ } split /\s+/, $ENV{ARCHES};
}
# We seem to be building a source-only CD. Check for whatever binary