summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-05 22:14:26 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-25 22:27:46 +0000
commit31a84b4316b96a57c844eb196244c2e522691c4e (patch)
treeb56933c8f1ae5a16d248b8bd7f383574064e4d2a /meta/classes/package_rpm.bbclass
parent6ab2cac421149ebe29d3e0feed165a5fd84a6c8d (diff)
downloadpoky-31a84b4316b96a57c844eb196244c2e522691c4e.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) (From OE-Core rev: b119872fb794a36b6eb9ef5e9c42a9c6c991e835) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 21ada348aa..7d75f460c7 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -690,7 +690,7 @@ python do_package_rpm () {
690 cmd = cmd + " --define '_tmppath " + workdir + "'" 690 cmd = cmd + " --define '_tmppath " + workdir + "'"
691 if d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and bb.data.inherits_class('archiver', d): 691 if d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and bb.data.inherits_class('archiver', d):
692 cmd = cmd + " --define '_sourcedir " + d.getVar('ARCHIVER_OUTDIR') + "'" 692 cmd = cmd + " --define '_sourcedir " + d.getVar('ARCHIVER_OUTDIR') + "'"
693 cmdsrpm = cmd + " --define '_srcrpmdir " + d.getVar('ARCHIVER_OUTDIR') + "'" 693 cmdsrpm = cmd + " --define '_srcrpmdir " + d.getVar('ARCHIVER_RPMOUTDIR') + "'"
694 cmdsrpm = cmdsrpm + " -bs " + outspecfile 694 cmdsrpm = cmdsrpm + " -bs " + outspecfile
695 # Build the .src.rpm 695 # Build the .src.rpm
696 d.setVar('SBUILDSPEC', cmdsrpm + "\n") 696 d.setVar('SBUILDSPEC', cmdsrpm + "\n")