From: Tom Rini <tom_rini@mentor.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH] Add locking on tasks that add package_update_index_ipk
Date: Fri, 04 Jun 2010 17:03:59 -0700 [thread overview]
Message-ID: <4C09946F.9040401@mentor.com> (raw)
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.
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
--
Tom Rini
Mentor Graphics Corporation
next reply other threads:[~2010-06-05 0:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-05 0:03 Tom Rini [this message]
2010-06-05 0:06 ` [PATCH] Add locking on tasks that add package_update_index_ipk Chris Larson
2010-06-06 19:11 ` Roman I Khimov
2010-06-07 15:53 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C09946F.9040401@mentor.com \
--to=tom_rini@mentor.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox