diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-03-10 11:58:15 -0600 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2011-03-10 18:11:53 -0800 |
commit | 1d5ca654a482f582c75faf546140dfd6064da73b (patch) | |
tree | 5d4d507cc384ac202def017a4ad4c4f321cf02cd /meta/classes/package_rpm.bbclass | |
parent | dbc752c75786b0985fbeb4986467ae01290f424a (diff) | |
download | openembedded-core-1d5ca654a482f582c75faf546140dfd6064da73b.tar.gz openembedded-core-1d5ca654a482f582c75faf546140dfd6064da73b.tar.bz2 openembedded-core-1d5ca654a482f582c75faf546140dfd6064da73b.tar.xz openembedded-core-1d5ca654a482f582c75faf546140dfd6064da73b.zip |
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.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 60127d2ef..4647116ee 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -777,10 +777,16 @@ python do_package_rpm () { cmd = cmd + " --define 'debug_package %{nil}'" cmd = cmd + " -bb " + outspecfile - # Build the spec file! + # Take a shared lock, we can write multiple packages at the same time... + # but we need to stop the rootfs/solver from running while we do... + lf = bb.utils.lockfile(bb.data.expand("${DEPLOY_DIR_RPM}/rpm.lock", d), True) + + # Build the rpm package! bb.data.setVar('BUILDSPEC', cmd + "\n", d) bb.data.setVarFlag('BUILDSPEC', 'func', '1', d) bb.build.exec_func('BUILDSPEC', d) + + bb.utils.unlockfile(lf) } python () { |