Skip to content

Commit

Permalink
[backend] implement linkedbuild exclusion logic in wipeobsolete
Browse files Browse the repository at this point in the history
We still need to implement 'localdep' wiping, but this is a first
step...
  • Loading branch information
mlschroe committed Jun 22, 2018
1 parent 23129a9 commit 25acebc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/backend/BSSched/Checker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ sub wipeobsolete {
my $repoid = $ctx->{'repository'};
my $projpacks = $gctx->{'projpacks'};
my $myarch = $gctx->{'arch'};
my $repo = (grep {$_->{'name'} eq $repoid} @{$projpacks->{$projid}->{'repository'} || []})[0];
my $linkedbuild = $repo ? $repo->{'linkedbuild'} : 'all';
my $pdatas = $projpacks->{$projid}->{'package'} || {};
my $dstcache = { 'fullcache' => {}, 'bininfocache' => {} };
my $hadobsolete;
Expand All @@ -275,6 +277,10 @@ sub wipeobsolete {
if (($pdata->{'error'} || '') eq 'excluded') {
$reason = 'excluded';
} else {
if (exists($pdata->{'originproject'})) {
# package from project link
$reason = 'excluded' if !$linkedbuild || ($linkedbuild ne 'localdep' && $linkedbuild ne 'all');
}
my %info = map {$_->{'repository'} => $_} @{$pdata->{'info'} || []};
my $info = $info{$repoid};
$reason = 'excluded' if $info && ($info->{'error'} || '') eq 'excluded';
Expand Down

0 comments on commit 25acebc

Please sign in to comment.