[oe-commits] Ihar Hrachyshka : Fixed concurrency problem for ZIP packed recipes.

git version control git at git.openembedded.org
Sun Jan 24 10:39:19 UTC 2010


Module: openembedded.git
Branch: holger/staging-branch
Commit: a39441278e7b6b756cd4f77a533fd48db46f5c79
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=a39441278e7b6b756cd4f77a533fd48db46f5c79

Author: Ihar Hrachyshka <ihar.hrachyshka at gmail.com>
Date:   Mon Sep  7 03:10:13 2009 +0000

Fixed concurrency problem for ZIP packed recipes.

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 at gmail.com>

---

 classes/base.bbclass |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/classes/base.bbclass b/classes/base.bbclass
index 384a67d..c791b94 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -1245,6 +1245,15 @@ def base_after_parse(d):
         depends = depends + " git-native:do_populate_staging"
         bb.data.setVarFlag('do_fetch', '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_staging"
+        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)





More information about the Openembedded-commits mailing list