Skip to content

Commit

Permalink
[backend] patchinfo: allow to skip updateinfo.xml generation
Browse files Browse the repository at this point in the history
To be able collect binaries without creating update meta information.

OBS-298
  • Loading branch information
adrianschroeter committed Feb 22, 2024
1 parent 39f6dc6 commit 942e23f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/api/api/patchinfo.rng
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
<value>optional</value>
<value>feature</value>
<value>ptf</value>
<value>no_updateinfo</value>
</choice>
</define>

Expand Down
6 changes: 4 additions & 2 deletions src/backend/BSSched/BuildJob/Patchinfo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,10 @@ sub build {
};
$update->{'pkglist'} = {'collection' => [ $col ] };
$update->{'patchinforef'} = "$projid/$packid"; # deleted in publisher...
writexml("$jobdatadir/updateinfo.xml", undef, {'update' => [$update]}, $BSXML::updateinfo);
$bininfo->{'updateinfo.xml'} = genbininfo($jobdatadir, 'updateinfo.xml');
if ($category ne 'no_updateinfo') {
writexml("$jobdatadir/updateinfo.xml", undef, {'update' => [$update]}, $BSXML::updateinfo);
$bininfo->{'updateinfo.xml'} = genbininfo($jobdatadir, 'updateinfo.xml');
};
writestr("$jobdatadir/logfile", undef, "update built succeeded ".localtime($now)."\n");
$updateinfodata = {
'packages' => \@tocopy,
Expand Down
2 changes: 1 addition & 1 deletion src/backend/BSVerify.pm
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ sub verify_patchinfo {
# This verifies the absolute minimum required content of a patchinfo file
my $p = $_[0];
verify_filename($p->{'name'}) if defined($p->{'name'});
my %allowed_categories = map {$_ => 1} qw{security recommended optional feature ptf};
my %allowed_categories = map {$_ => 1} qw{security recommended optional feature ptf no_updateinfo};
die("Invalid category defined in _patchinfo\n") if defined($p->{'category'}) && !$allowed_categories{$p->{'category'}};
for my $rt (@{$p->{'releasetarget'} || []}) {
verify_projid($rt->{'project'});
Expand Down

0 comments on commit 942e23f

Please sign in to comment.