Skip to content

Commit

Permalink
[backend] fix sourcepublich blocklist handling
Browse files Browse the repository at this point in the history
* skip blocked items and do not abort
* fix regexp handling as well
  • Loading branch information
adrianschroeter committed Mar 16, 2022
1 parent cc400c0 commit f152c0e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/backend/bs_srcserver
Expand Up @@ -6812,16 +6812,16 @@ sub external_notification_sourcepublish {
}

if ($BSConfig::sourcepublish_blocklist) {
my $xml = readxml("$projectsdir/$project.xml", $BSXML::proj, 1);
die("400 Unable to parse $project.xml\n") unless $xml;
if ( {$xml->{'kind'} || ''} eq 'maintenance_release' ) {
if (grep {$package =~ /^$_\./} @$BSConfig::sourcepublish_blocklist) {
my $proj = readxml("$projectsdir/$project.xml", $BSXML::proj, 1);
die("400 Unable to parse $project.xml\n") unless $proj;
if ( ($proj->{'kind'} || '') eq 'maintenance_release' ) {
if (grep {$package eq $_ || $package =~ /^\Q$_\E\./} @$BSConfig::sourcepublish_blocklist) {
BSUtil::printlog("block list hit for $package in maintenance release project");
return;
next;
}
} elsif (grep {$package eq $_} @$BSConfig::sourcepublish_blocklist) {
BSUtil::printlog("block list hit for $package");
return;
next;
}
}

Expand Down

0 comments on commit f152c0e

Please sign in to comment.