[oe-commits] Tom Rini : rootfs_ipk/meta-toolchain: Add locking on tasks that add package_update_index_ipk

git version control git at git.openembedded.org
Mon Jun 7 15:56:02 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 5e813f8a9e1b607233f3794b2c981ce1d8c84fac
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=5e813f8a9e1b607233f3794b2c981ce1d8c84fac

Author: Tom Rini <tom_rini at mentor.com>
Date:   Mon Jun  7 08:54:13 2010 -0700

rootfs_ipk/meta-toolchain: Add locking on tasks that add package_update_index_ipk

We add a lockfile of do_populate_sdk and do_rootfs (in rootfs_ipk) that is also
the lockfile that package_update_index_ipk uses.  With enough threads it is
possible that one image (or meta-toolchain) is attempting to use the package
index while another has only reached the point of generating the index leading
to an empty index being seen later on.

Acked-by: Chris Larson <chris_larson at mentor.com>
Acked-by: Roman I Khimov <khimov at altell.ru>
Signed-off-by: Tom Rini <tom_rini at mentor.com>

---

 classes/rootfs_ipk.bbclass     |    1 +
 recipes/meta/canadian-sdk.bb   |    1 +
 recipes/meta/meta-toolchain.bb |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index 9fa1d5e..0303c54 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -6,6 +6,7 @@
 #
 
 do_rootfs[depends] += "opkg-native:do_populate_sysroot"
+do_rootfs[lockfiles] = "${DEPLOY_DIR_IPK}.lock"
 
 IPKG_TMP_DIR = "${IMAGE_ROOTFS}-tmp"
 IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} -t ${IPKG_TMP_DIR} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}"
diff --git a/recipes/meta/canadian-sdk.bb b/recipes/meta/canadian-sdk.bb
index 47529a2..2160441 100644
--- a/recipes/meta/canadian-sdk.bb
+++ b/recipes/meta/canadian-sdk.bb
@@ -169,5 +169,6 @@ do_populate_sdk() {
 }
 
 do_populate_sdk[nostamp] = "1"
+do_populate_sdk[lockfiles] = "${DEPLOY_DIR_IPK}.lock"
 addtask package_update_index_ipk before do_populate_sdk
 addtask populate_sdk before do_build after do_install
diff --git a/recipes/meta/meta-toolchain.bb b/recipes/meta/meta-toolchain.bb
index 064fc3b..82918ad 100644
--- a/recipes/meta/meta-toolchain.bb
+++ b/recipes/meta/meta-toolchain.bb
@@ -177,5 +177,6 @@ do_populate_sdk() {
 }
 
 do_populate_sdk[nostamp] = "1"
+do_populate_sdk[lockfiles] = "${DEPLOY_DIR_IPK}.lock"
 addtask package_update_index_ipk before do_populate_sdk
 addtask populate_sdk before do_build after do_install





More information about the Openembedded-commits mailing list