Skip to content

Commit

Permalink
productcompose: Allow to have an excluded main package
Browse files Browse the repository at this point in the history
when using flavors and no default architecture is set.
  • Loading branch information
adrianschroeter committed Nov 30, 2023
1 parent 3c7a8d2 commit 51ed337
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Build/ProductCompose.pm
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,18 @@ sub parse {
for my $flavor (@{$data->{'flavors'}}) {
my $f = $flavor->{$cf->{'buildflavor'}};
next unless $f;
@architectures = @{$f->{'architectures'}} if $f->{'architectures'};
@architectures = @{$f->{'architectures'} || []} if $f->{'architectures'};
}
if (@architectures) {
$ret->{'exclarch'} = \@architectures;
} else {
# We have flavors, but no architecture defined.
# This can also exclude the main package in multibuild case
$ret->{'error'} = 'excluded';
}
} else {
$ret->{'exclarch'} = \@architectures if @architectures;
}
$ret->{'exclarch'} = \@architectures if @architectures;

my @unpack_packdeps = filter_packages(@{$data->{'unpack_packages'}});
my @packdeps = filter_packages(@{$data->{'packages'}});
Expand Down

0 comments on commit 51ed337

Please sign in to comment.