Skip to content

Commit

Permalink
[backend] hide packages with incident suffix in project links
Browse files Browse the repository at this point in the history
This makes it possible to rebuild all packages from a project
link pointing to a maintenance incident project. The packages
are just hidden in the package list, i.e. source links to them
still work.

We can make the behaviour configurable if needed.
  • Loading branch information
mlschroe committed Jan 13, 2021
1 parent 671a8b1 commit ba584ab
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/backend/BSSrcServer/Projlink.pm
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,21 @@ sub findpackages_projlink {
my $lproj = BSRevision::readproj_local($lprojid, 1);
my $llink;
$llink = delete $lproj->{'link'} if $lproj;
@lpackids = $findpackages->($lprojid, $lproj, $nonfatal || -1, $lorigins);
if ($lproj && ($lproj->{'kind'} || '') eq 'maintenance_release') {
my $llorigins = $lorigins || {};
@lpackids = $findpackages->($lprojid, $lproj, $nonfatal || -1, $llorigins);
# strip out packages with incident suffix
my %lpackids = map {$_ => 1} @lpackids;
$lpackids{'patchinfo'} = 1; # bah!
for (@lpackids) {
next if $llorigins->{$_} && $llorigins->{$_} ne $lprojid;
next unless /^(.*)\.\d+$/ && $lpackids{$1};
$_ = undef;
}
@lpackids = grep {defined($_)} @lpackids;
} else {
@lpackids = $findpackages->($lprojid, $lproj, $nonfatal || -1, $lorigins);
}
unshift @todo, map {$_->{'project'}} @$llink if $llink;
}
@lpackids = grep {$_ ne '_product' && !/^_product:/} @lpackids if $packids{'_product'};
Expand Down

0 comments on commit ba584ab

Please sign in to comment.