[oe-commits] Richard Purdie : packaged-staging.bbclass: Use a variable for the location of the staging lock file (from Poky)

git version control git at git.openembedded.org
Wed Nov 11 06:25:53 UTC 2009


Module: openembedded.git
Branch: shr/merge
Commit: 5c7d389a900e2c821a5e5572f7a1bc568f86be18
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=5c7d389a900e2c821a5e5572f7a1bc568f86be18

Author: Richard Purdie <rpurdie at linux.intel.com>
Date:   Mon Nov  2 17:38:29 2009 +0000

packaged-staging.bbclass: Use a variable for the location of the staging lock file (from Poky)

Signed-off-by: Richard Purdie <rpurdie at linux.intel.com>

---

 classes/base.bbclass             |    1 +
 classes/packaged-staging.bbclass |    8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/classes/base.bbclass b/classes/base.bbclass
index 024f822..a75324b 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -1053,6 +1053,7 @@ addtask populate_staging after do_install
 
 SYSROOT_PREPROCESS_FUNCS ?= ""
 SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir/"
+SYSROOT_LOCK = "${STAGING_DIR}/staging.lock"
 
 python do_populate_staging () {
     bb.build.exec_func('do_stage', d)
diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index e3d274b..cb4d1b0 100644
--- a/classes/packaged-staging.bbclass
+++ b/classes/packaged-staging.bbclass
@@ -110,7 +110,7 @@ def pstage_cleanpackage(pkgname, d):
 	list_cmd = bb.data.getVar("PSTAGE_LIST_CMD", d, True)
 
 	bb.debug(2, "Checking if staging package installed")
-	lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d))
+	lf = bb.utils.lockfile(bb.data.expand("${SYSROOT_LOCK}", d))
 	ret = os.system("PATH=\"%s\" %s | grep %s" % (path, list_cmd, pkgname))
 	if ret == 0:
 		bb.debug(1, "Uninstalling package from staging...")
@@ -228,7 +228,7 @@ python packagestage_scenefunc () {
         if stageok:
             bb.note("Staging package found, using it for %s." % file)
             installcmd = bb.data.getVar("PSTAGE_INSTALL_CMD", d, 1)
-            lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d))
+            lf = bb.utils.lockfile(bb.data.expand("${SYSROOT_LOCK}", d))
             ret = os.system("PATH=\"%s\" %s %s" % (path, installcmd, stagepkg))
             bb.utils.unlockfile(lf)
             if ret != 0:
@@ -292,7 +292,7 @@ populate_staging_postamble () {
 	fi
 }
 
-do_populate_staging[lockfiles] = "${STAGING_DIR}/staging.lock"
+do_populate_staging[lockfiles] = "${SYSROOT_LOCK}"
 do_populate_staging[dirs] =+ "${DEPLOY_DIR_PSTAGE}"
 python do_populate_staging_prepend() {
     bb.build.exec_func("populate_staging_preamble", d)
@@ -420,7 +420,7 @@ python do_package_stage () {
     pstage_set_pkgmanager(d)
     bb.build.exec_func("staging_helper", d)
     bb.build.exec_func("staging_packager", d)
-    lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d))
+    lf = bb.utils.lockfile(bb.data.expand("${SYSROOT_LOCK}", d))
     bb.build.exec_func("staging_package_installer", d)
     bb.utils.unlockfile(lf)
 }





More information about the Openembedded-commits mailing list