Patchwork [CONSOLIDATED,PULL,14/22] Fixed concurrency problem for ZIP packed recipes.

login
register
mail settings
Submitter Saul Wold
Date July 19, 2011, 6:51 a.m.
Message ID <c878650fba77994c00db01b4b9999fd70818544e.1311058024.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/7857/
State New, archived
Headers show

Comments

Saul Wold - July 19, 2011, 6:51 a.m.
From: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>

The problem occured when unzip-native is not yet staged, and ZIP
archive unpacking already started resulting in failed do_unpack task.
Added NEED_UNZIP_FOR_UNPACK variable to use in recipes which do_unpack
with unzip utility but doesn't have '.zip' in SRC_URI (f.e. .EXE
windows self-extraction binaries).

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
Signed-off-by: Koen Kooi <koen@openembedded.org>
Signed-off-by: Tom Rini <tom_rini@mentor.com>
---
 meta/classes/base.bbclass |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

Patch

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 3ca4e47..56f744d 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -354,6 +354,15 @@  python () {
         depends = depends + " xz-native:do_populate_sysroot"
         bb.data.setVarFlag('do_unpack', 'depends', depends, d)
 
+    # unzip-native should already be staged before unpacking ZIP recipes
+    need_unzip = bb.data.getVar('NEED_UNZIP_FOR_UNPACK', d, 1)
+    src_uri = bb.data.getVar('SRC_URI', d, 1)
+
+    if ".zip" in src_uri or need_unzip == "1":
+        depends = bb.data.getVarFlag('do_unpack', 'depends', d) or ""
+        depends = depends + " unzip-native:do_populate_sysroot"
+        bb.data.setVarFlag('do_unpack', 'depends', depends, d)
+
     # 'multimachine' handling
     mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1)
     pkg_arch = bb.data.getVar('PACKAGE_ARCH', d, 1)