summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-03-10 11:58:15 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-10 18:46:02 -0800
commitc180383885e32aed83c4f8691115859966fb53be (patch)
tree2b286ffbcd144b35c8d9f9b2abd2cfb6b0526aa6 /meta/classes/package_rpm.bbclass
parentd8a82c2e79375f4895623138a2c0d5ae81f9d6a0 (diff)
downloadpoky-c180383885e32aed83c4f8691115859966fb53be.tar.gz
package_rpm: Fix rootfs generation
[YOCTO #797] During rootfs generation, if other RPM packages are being wrtten this could cause a failure during the solvedb generation. We add a shared lock around the RPM package building. This will allow multiple RPM packages to continue to be written at the same time, but prevent rootfs generation and RPM package generation at the same time. (From OE-Core rev: 1d5ca654a482f582c75faf546140dfd6064da73b) Signed-off-by: Mark Hatle <mark.hatle@windriver.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.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 60127d2ef4..4647116eed 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -777,10 +777,16 @@ python do_package_rpm () {
777 cmd = cmd + " --define 'debug_package %{nil}'" 777 cmd = cmd + " --define 'debug_package %{nil}'"
778 cmd = cmd + " -bb " + outspecfile 778 cmd = cmd + " -bb " + outspecfile
779 779
780 # Build the spec file! 780 # Take a shared lock, we can write multiple packages at the same time...
781 # but we need to stop the rootfs/solver from running while we do...
782 lf = bb.utils.lockfile(bb.data.expand("${DEPLOY_DIR_RPM}/rpm.lock", d), True)
783
784 # Build the rpm package!
781 bb.data.setVar('BUILDSPEC', cmd + "\n", d) 785 bb.data.setVar('BUILDSPEC', cmd + "\n", d)
782 bb.data.setVarFlag('BUILDSPEC', 'func', '1', d) 786 bb.data.setVarFlag('BUILDSPEC', 'func', '1', d)
783 bb.build.exec_func('BUILDSPEC', d) 787 bb.build.exec_func('BUILDSPEC', d)
788
789 bb.utils.unlockfile(lf)
784} 790}
785 791
786python () { 792python () {