diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-02 17:38:29 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-10 13:46:38 +0000 |
commit | 5c7d389a900e2c821a5e5572f7a1bc568f86be18 (patch) | |
tree | 69cc734a690895f25f6871a298c5bd8789e7f201 | |
parent | 177d10d75a8d8d9357d42b7b95a937ffe1e1c88b (diff) |
packaged-staging.bbclass: Use a variable for the location of the staging lock file (from Poky)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r-- | classes/base.bbclass | 1 | ||||
-rw-r--r-- | classes/packaged-staging.bbclass | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 024f8227bc..a75324b48e 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 e3d274b674..cb4d1b0a96 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) } |