rootfs_ipk/meta-toolchain: Add locking on tasks that add package_update_index_ipk
authorTom Rini <tom_rini@mentor.com>
Mon, 7 Jun 2010 15:54:13 +0000 (08:54 -0700)
committerTom Rini <tom_rini@mentor.com>
Mon, 7 Jun 2010 15:54:13 +0000 (08:54 -0700)
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@mentor.com>
Acked-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Tom Rini <tom_rini@mentor.com>
classes/rootfs_ipk.bbclass
recipes/meta/canadian-sdk.bb
recipes/meta/meta-toolchain.bb

index 9fa1d5e..0303c54 100644 (file)
@@ -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)}"
index 47529a2..2160441 100644 (file)
@@ -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
index 064fc3b..82918ad 100644 (file)
@@ -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