Skip to content

Commit

Permalink
ProductCompose: Fix seenps population code
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Jan 11, 2024
1 parent 6a127a0 commit e76a6ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Build/ProductCompose.pm
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,17 @@ sub get_pkgset {
my ($packagesets, $setname, $arch, $flavor) = @_;
$flavor = '' unless defined $flavor;
my @seenps;
my $lasts;
for my $s (@$packagesets) {
push @seenps, $lasts if defined $lasts;
$lasts = $s;
next unless $setname eq ($s->{'name'} || 'main');
next if $s->{'flavors'} && !grep {$_ eq $flavor} @{$s->{'flavors'}};
next if $s->{'architectures'} && !grep {$_ eq $arch} @{$s->{'architectures'}};
push @seenps, $s;
my $pkgset = $s->{'packages'} || [];
for my $n (@{$s->{'add'} || []}) {
$pkgset = add_pkgset($pkgset, get_pkgset($packagesets, $n, $arch, $flavor));
$pkgset = add_pkgset($pkgset, get_pkgset(\@seenps, $n, $arch, $flavor));
}
for my $n (@{$s->{'sub'} || []}) {
$pkgset = sub_pkgset($pkgset, get_pkgset(\@seenps, $n, $arch, $flavor));
Expand Down

0 comments on commit e76a6ac

Please sign in to comment.