diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-02 17:38:44 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-13 12:15:22 +0000 |
commit | a1d93ee3260d8161c7ae14674e01b516b952dea9 (patch) | |
tree | 8facf7f173a44d4790563f6107d2cc5be1f02582 /meta/classes | |
parent | 3c83baeb26be3c0c463eef1790213ce7f1b72c5f (diff) | |
download | poky-a1d93ee3260d8161c7ae14674e01b516b952dea9.tar.gz |
packaged-staging.bbclass: Use a variable for the location of the staging lock file
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/base.bbclass | 1 | ||||
-rw-r--r-- | meta/classes/packaged-staging.bbclass | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 45adeb9e6e..b536f92e48 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -998,6 +998,7 @@ addtask populate_staging after do_install | |||
998 | 998 | ||
999 | SYSROOT_PREPROCESS_FUNCS ?= "" | 999 | SYSROOT_PREPROCESS_FUNCS ?= "" |
1000 | SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir/" | 1000 | SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir/" |
1001 | SYSROOT_LOCK = "${STAGING_DIR}/staging.lock" | ||
1001 | 1002 | ||
1002 | python do_populate_staging () { | 1003 | python do_populate_staging () { |
1003 | # | 1004 | # |
diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass index 7ad8b4b724..6df13876c2 100644 --- a/meta/classes/packaged-staging.bbclass +++ b/meta/classes/packaged-staging.bbclass | |||
@@ -135,7 +135,7 @@ def pstage_cleanpackage(pkgname, d): | |||
135 | list_cmd = bb.data.getVar("PSTAGE_LIST_CMD", d, True) | 135 | list_cmd = bb.data.getVar("PSTAGE_LIST_CMD", d, True) |
136 | 136 | ||
137 | bb.note("Checking if staging package installed") | 137 | bb.note("Checking if staging package installed") |
138 | lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) | 138 | lf = bb.utils.lockfile(bb.data.expand("${SYSROOT_LOCK}", d)) |
139 | ret = os.system("PATH=\"%s\" %s | grep %s" % (path, list_cmd, pkgname)) | 139 | ret = os.system("PATH=\"%s\" %s | grep %s" % (path, list_cmd, pkgname)) |
140 | if ret == 0: | 140 | if ret == 0: |
141 | bb.note("Yes. Uninstalling package from staging...") | 141 | bb.note("Yes. Uninstalling package from staging...") |
@@ -254,7 +254,7 @@ python packagestage_scenefunc () { | |||
254 | if stageok: | 254 | if stageok: |
255 | bb.note("Staging package found, using it for %s." % file) | 255 | bb.note("Staging package found, using it for %s." % file) |
256 | installcmd = bb.data.getVar("PSTAGE_INSTALL_CMD", d, 1) | 256 | installcmd = bb.data.getVar("PSTAGE_INSTALL_CMD", d, 1) |
257 | lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) | 257 | lf = bb.utils.lockfile(bb.data.expand("${SYSROOT_LOCK}", d)) |
258 | ret = os.system("PATH=\"%s\" %s %s" % (path, installcmd, stagepkg)) | 258 | ret = os.system("PATH=\"%s\" %s %s" % (path, installcmd, stagepkg)) |
259 | bb.utils.unlockfile(lf) | 259 | bb.utils.unlockfile(lf) |
260 | if ret != 0: | 260 | if ret != 0: |
@@ -326,12 +326,11 @@ autotools_staging_pstage () { | |||
326 | cp -fpPR ${WORKDIR}/temp-staging-pstage/${STAGING_DIR}/* ${STAGING_DIR}/ || /bin/true | 326 | cp -fpPR ${WORKDIR}/temp-staging-pstage/${STAGING_DIR}/* ${STAGING_DIR}/ || /bin/true |
327 | } | 327 | } |
328 | 328 | ||
329 | #do_populate_staging[lockfiles] = "${STAGING_DIR}/staging.lock" | ||
330 | do_populate_staging[dirs] =+ "${DEPLOY_DIR_PSTAGE}" | 329 | do_populate_staging[dirs] =+ "${DEPLOY_DIR_PSTAGE}" |
331 | python do_populate_staging_prepend() { | 330 | python do_populate_staging_prepend() { |
332 | needstamp = bb.data.getVar("PSTAGING_NEEDSTAMP", d, 1) | 331 | needstamp = bb.data.getVar("PSTAGING_NEEDSTAMP", d, 1) |
333 | pstageactive = bb.data.getVar("PSTAGING_ACTIVE", d, True) | 332 | pstageactive = bb.data.getVar("PSTAGING_ACTIVE", d, True) |
334 | lock = bb.data.expand("${STAGING_DIR}/staging.lock", d) | 333 | lock = bb.data.expand("${SYSROOT_LOCK}", d) |
335 | if needstamp == "1": | 334 | if needstamp == "1": |
336 | stamplock = bb.utils.lockfile(lock) | 335 | stamplock = bb.utils.lockfile(lock) |
337 | bb.build.exec_func("populate_staging_preamble", d) | 336 | bb.build.exec_func("populate_staging_preamble", d) |
@@ -481,7 +480,7 @@ python do_package_stage () { | |||
481 | pstage_set_pkgmanager(d) | 480 | pstage_set_pkgmanager(d) |
482 | bb.build.exec_func("staging_helper", d) | 481 | bb.build.exec_func("staging_helper", d) |
483 | bb.build.exec_func("staging_packager", d) | 482 | bb.build.exec_func("staging_packager", d) |
484 | lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) | 483 | lf = bb.utils.lockfile(bb.data.expand("${SYSROOT_LOCK}", d)) |
485 | bb.build.exec_func("staging_package_installer", d) | 484 | bb.build.exec_func("staging_package_installer", d) |
486 | bb.utils.unlockfile(lf) | 485 | bb.utils.unlockfile(lf) |
487 | } | 486 | } |