Skip to content

Commit

Permalink
Merge pull request #15300 from mlschroe/master
Browse files Browse the repository at this point in the history
[backend] ProductCompose: support versioned package names
  • Loading branch information
mlschroe committed Nov 30, 2023
2 parents 8bb8c5f + 1323f28 commit 604fc36
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/backend/BSSched/BuildJob/ProductCompose.pm
Expand Up @@ -127,6 +127,13 @@ sub check {

my @deps = @{$info->{'dep'} || []}; # expanded?
my %deps = map {$_ => 1} @deps;
my $versioned_deps;
for (grep {/[<=>]/} @deps) {
next unless /^(.*?)\s*([<=>].*)$/;
$deps{$1} = $2;
delete $deps{$_};
$versioned_deps = 1;
}
delete $deps{''};
delete $deps{"-$_"} for grep {!/^-/} keys %deps;

Expand Down Expand Up @@ -262,6 +269,7 @@ sub check {
$mode |= 1 if $nodbgpkgs;
$mode |= 2 if $nosrcpkgs;
$mode |= 4 if $allpacks;
$mode |= 8 if $versioned_deps;

my $maxblocked = 20;
my %blockedarch;
Expand Down Expand Up @@ -398,10 +406,17 @@ sub check {
next if $archs{$1}; # we pick it up from the real arch
next if $seen_fn{$2};
}
if (!($deps{$bn} || ($allpacks && !$deps{"-$bn"}))) {
my $d = $deps{$bn};
if (!($d || ($allpacks && !$deps{"-$bn"}))) {
$unneeded_na{$na} = 1; # cache unneeded
next;
}
if ($d && $d ne '1') {
my $bi = $bininfo->{$fn};
my $evr = "$bi->{'version'}-$bi->{'release'}";
$evr = "$bi->{'epoch'}:$evr" if $bi->{'epoch'};
next unless Build::matchsingledep("$bn=$evr", "$bn$d", 'rpm');
}
$needit = 1;
last;
}
Expand Down

0 comments on commit 604fc36

Please sign in to comment.