From c6e151ba7fe0f14044537cf0ab2cac436f1496e3 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 5 Feb 2019 22:14:26 +0000 Subject: 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. Signed-off-by: Richard Purdie --- meta/classes/package_rpm.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/classes/package_rpm.bbclass') 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 () { cmd = cmd + " --define '_tmppath " + workdir + "'" if d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and bb.data.inherits_class('archiver', d): cmd = cmd + " --define '_sourcedir " + d.getVar('ARCHIVER_OUTDIR') + "'" - cmdsrpm = cmd + " --define '_srcrpmdir " + d.getVar('ARCHIVER_OUTDIR') + "'" + cmdsrpm = cmd + " --define '_srcrpmdir " + d.getVar('ARCHIVER_RPMOUTDIR') + "'" cmdsrpm = cmdsrpm + " -bs " + outspecfile # Build the .src.rpm d.setVar('SBUILDSPEC', cmdsrpm + "\n") -- cgit 1.2.3-korg