diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-05 22:14:26 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-06 08:29:07 +0000 |
| commit | 251ded90d4ad75da5e110e916068050f15ace07c (patch) | |
| tree | 426957d956abfd8377f21b61f483156753107668 /meta/classes/package_rpm.bbclass | |
| parent | d1a67109ea52444d60ef6d7282929c9cd6012624 (diff) | |
| download | poky-251ded90d4ad75da5e110e916068050f15ace07c.tar.gz | |
archiver/package_rpm: Fix the worst src.rpm generation race
The package_rpm code is writing outside the task's sstate directory into
the sstate of do_deploy_archives. This is "out of spec" since if the
task is installed from sstate, the files are not restored. This means
the files may appear/disappear, things are not deterministic and there are
races.
Extend the do_package_write_rpm code to handle writing the src.rpm into
place to avoid these issues. There are other problems but this avoids races
around this file.
(From OE-Core rev: c6e151ba7fe0f14044537cf0ab2cac436f1496e3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
| -rw-r--r-- | meta/classes/package_rpm.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 5dafb3e7cb..1a64cb271a 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
| @@ -694,7 +694,7 @@ python do_package_rpm () { | |||
| 694 | cmd = cmd + " --define '_tmppath " + workdir + "'" | 694 | cmd = cmd + " --define '_tmppath " + workdir + "'" |
| 695 | if d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and bb.data.inherits_class('archiver', d): | 695 | if d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and bb.data.inherits_class('archiver', d): |
| 696 | cmd = cmd + " --define '_sourcedir " + d.getVar('ARCHIVER_OUTDIR') + "'" | 696 | cmd = cmd + " --define '_sourcedir " + d.getVar('ARCHIVER_OUTDIR') + "'" |
| 697 | cmdsrpm = cmd + " --define '_srcrpmdir " + d.getVar('ARCHIVER_OUTDIR') + "'" | 697 | cmdsrpm = cmd + " --define '_srcrpmdir " + d.getVar('ARCHIVER_RPMOUTDIR') + "'" |
| 698 | cmdsrpm = cmdsrpm + " -bs " + outspecfile | 698 | cmdsrpm = cmdsrpm + " -bs " + outspecfile |
| 699 | # Build the .src.rpm | 699 | # Build the .src.rpm |
| 700 | d.setVar('SBUILDSPEC', cmdsrpm + "\n") | 700 | d.setVar('SBUILDSPEC', cmdsrpm + "\n") |
