summaryrefslogtreecommitdiff
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-29 11:58:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-29 14:01:11 +0100
commit833a1e970f087dfcb32967cee3e24540f041cde0 (patch)
tree95f52501b31ef9cd8823d3f863c005a11ba94ec5 /meta/classes/package_rpm.bbclass
parentc411a10e06f479ff364c07766f7c77907b7b4a16 (diff)
downloadopenembedded-core-833a1e970f087dfcb32967cee3e24540f041cde0.tar.gz
openembedded-core-833a1e970f087dfcb32967cee3e24540f041cde0.tar.bz2
openembedded-core-833a1e970f087dfcb32967cee3e24540f041cde0.tar.xz
openembedded-core-833a1e970f087dfcb32967cee3e24540f041cde0.zip
package_rpm: Ensure we take the sstate shared lockfile in the place we write files
The point we need to take the lock is when the rpm files are written into the deploy rpm directory. Since sstate makes the actual installation of the files, that is the point we need to take the lock. This also stops the deploy/rpm directory being accessed for a lock before it exists. [YOCTO #797] [YOCTO #925] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass9
1 files changed, 3 insertions, 6 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 4647116ee..70170d19e 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -777,16 +777,10 @@ python do_package_rpm () {
cmd = cmd + " --define 'debug_package %{nil}'"
cmd = cmd + " -bb " + outspecfile
- # 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 () {
@@ -803,6 +797,9 @@ SSTATETASKS += "do_package_write_rpm"
do_package_write_rpm[sstate-name] = "deploy-rpm"
do_package_write_rpm[sstate-inputdirs] = "${PKGWRITEDIRRPM}"
do_package_write_rpm[sstate-outputdirs] = "${DEPLOY_DIR_RPM}"
+# 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...
+do_package_write_rpm[sstate-lockfile-shared] += "${DEPLOY_DIR_RPM}/rpm.lock"
python do_package_write_rpm_setscene () {
sstate_setscene(d)