Skip to content

Commit

Permalink
Simplify exclarch handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Oct 31, 2024
1 parent 96be5ae commit a12052b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Build/Arch.pm
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,12 @@ sub parse {
my @assets = get_assets(\%vars, $asuf);
push @{$ret->{'remoteassets'}}, @assets if @assets;
}
my @exclarch;
push @exclarch, @{$vars{'arch'}};
@exclarch = grep {$_ ne "any"} @exclarch;
# unify
my %exclarch = map {$_ => 1} @exclarch;
@exclarch = sort keys %exclarch;
$ret->{'exclarch'} = \@exclarch if @exclarch;
my %exclarch = map {$_ => 1} @{$vars{'arch'} || []};
if (%exclarch && !$exclarch{'any'}) {
# map to obs scheduler names
$exclarch{'i386'} = $exclarch{'i486'} = $exclarch{'i586'} = $exclarch{'i686'} = 1 if $exclarch{'i386'} || $exclarch{'i486'} || $exclarch{'i586'} || $exclarch{'i686'};
$ret->{'exclarch'} = [ sort keys %exclarch ];
}
return $ret;
}

Expand Down

0 comments on commit a12052b

Please sign in to comment.