Skip to content

Commit

Permalink
Merge pull request #8775 from mlschroe/master
Browse files Browse the repository at this point in the history
[backend] ptf build: take meta from source dir
  • Loading branch information
mlschroe committed Nov 26, 2019
2 parents a3afa81 + 2125f4d commit 71a245c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/backend/BSSched/BuildJob/Patchinfo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,10 @@ sub build_ptf_job {
return ('broken', 'no rpms') unless @rpms;
# write a ptf.spec file
my $patchinfo = { %{$pdata->{'patchinfo'}} }; # copy so we can modify
return ('broken', 'no incident number') unless $patchinfo->{'incident'};
if (!$patchinfo->{'incident'}) {
return ('broken', 'no incident number') unless $ctx->{'project'} =~ /:(\d+)$/;
$patchinfo->{'incident'} = $1;
}
$patchinfo->{'version'} ||= 1;
$patchinfo->{'description'} =~ s/\n+$/\n/s if $patchinfo->{'description'};
my @ptfspec = split("\n", readstr("$obssrcdir/obs-ptf.spec"));
Expand Down
1 change: 1 addition & 0 deletions src/backend/bs_worker
Original file line number Diff line number Diff line change
Expand Up @@ -2992,6 +2992,7 @@ sub dobuild {
getbinaries($buildinfo, $pkgdir, $srcdir, $preinstallimagedata);
undef $oldpkgdir;
$buildinfo->{'file'} = 'ptf.spec';
@meta = split("\n", readstr("$srcdir/meta"));
} elsif ($followupmode) {
getfollowupsources($buildinfo, $srcdir);
getsslcert($buildinfo, $srcdir);
Expand Down

0 comments on commit 71a245c

Please sign in to comment.