summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-03-10 11:58:15 -0600
committerSaul Wold <sgw@linux.intel.com>2011-03-10 21:43:05 -0800
commite865b4f106e95fceb5e4094740d872b24fcb7dd5 (patch)
tree72fa487c35f48c1dc84001d26575e9f36a30d40b
parentb50738323037936544e890ed1e42878ff8ec4d0b (diff)
downloadpoky-e865b4f106e95fceb5e4094740d872b24fcb7dd5.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>
-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 () {