Skip to contentSkip to conversation

Fixed concurrency problem for ZIP packed recipes.

PATCH New Ihar Hrachyshka 3 participants 7 messages Sep 9, 2009 – Sep 10, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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).

---
 classes/base.bbclass |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
classes/base.bbclass +9 -0
index d29ba4b..bdee5b2 100644
@@ -1187,6 +1187,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)
Signature · 1 line
1.5.6.5
#1 lore raw

PATCH 1/1 Use automatic unzip-native dependency detection.

---
 recipes/jpeg/jasper_1.900.1.bb       |    1 -
 recipes/miglayout/miglayout_3.0.3.bb |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)
recipes/jpeg/jasper_1.900.1.bb +0 -1
index 9f1f5ee..a71dd68 100644
@@ -1,6 +1,5 @@
 DESCRIPTION = "Jpeg 2000 implementation"
 LICENSE = "MIT"
-DEPENDS = "unzip-native"
 
 SRC_URI = "http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-${PV}.zip"
 
recipes/miglayout/miglayout_3.0.3.bb +1 -1
index 2450a7e..87ab0f2 100644
@@ -10,7 +10,7 @@ S = "${WORKDIR}"
 
 inherit java-library
 
-DEPENDS = "unzip-native fastjar-native classpath swt3.4-gtk"
+DEPENDS = "fastjar-native classpath swt3.4-gtk"
 
 do_unpackpost() {
 	find -name "*.jar" -exec rm {} \;
Signature · 1 line
1.5.6.5
#2 lore raw

PATCH 1/1 Fixed checksum for tda1004x-firmware.

---
 conf/checksums.ini |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
conf/checksums.ini +2 -2
index 053a2ad..bb075cc 100644
@@ -18299,8 +18299,8 @@ md5=7fa369bff1031acbe4ca41f03bee7d02
 sha256=53d2f92c3d14423b49c2ff077855cf3987d38def963c82fd26fba5de379ca540
 
 [http://hauppauge.lightpath.net/de/nova-pci218c.exe]
-md5=139a1ed50a1a12e47b1f7deedf4f40c3
-sha256=4310a3a526ae5461e17f57353fc29f71d13820a215eaa62c629190cc2a026173
+md5=c4c751d8a79f6701fda4a1813c5d5823
+sha256=c5c54c57745cdf2390959e33f2cd44b87370f18b217f12de195d9f2de1c07b22
 
 [http://downloads.pf.itd.nrl.navy.mil/olsr/nrlolsrdv7.8.1.tgz]
 md5=46291de38362acdcd335bcf259055046
Signature · 1 line
1.5.6.5
#3 lore raw

Re: [PATCH] Fixed checksum for tda1004x-firmware.

conf/checksums.ini md5=7fa369bff1031acbe4ca41f03bee7d02 · line 18299

Quoted 11 lines · Ihar Hrachyshka
---
 conf/checksums.ini |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
conf/checksums.ini +0 -0
index 053a2ad..bb075cc 100644
@@ -18299,8 +18299,8 @@ md5=7fa369bff1031acbe4ca41f03bee7d02
 sha256=53d2f92c3d14423b49c2ff077855cf3987d38def963c82fd26fba5de379ca540

If your patch will be applied, you would probably have to review d5345f88b5ffdca098e0281f42f51e42ef43e79d and nearly completely revert plus remove unzip-native from DEPENDS.

Warning: You cannot do it completely. There are recipes that call unzip on auto-extract .exe file, and you have to keep my change there.

Signature · 2 lines
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
#4 lore raw

PATCH 1/1 Use NEED_UNZIP_FOR_UNPACK variable for some recipes.

In reply to Ihar Hrachyshka
---
 recipes/misc-binary-only/tda1004x-firmware.bb |    3 ++-
 recipes/mozilla/firefox-l10n.inc              |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
recipes/misc-binary-only/tda1004x-firmware.bb +2 -1
index 1e4d685..ff60717 100644
@@ -1,9 +1,10 @@
 SECTION = "base"
-DEPENDS = "unzip-native"
 
 SRC_URI = "http://hauppauge.lightpath.net/de/nova-pci218c.exe"
 FILES_${PN} = '*'
 
+NEED_UNZIP_FOR_UNPACK=1
+
 python do_unpack() {
 	import re
 
recipes/mozilla/firefox-l10n.inc +2 -1
index 31555e3..cecd53a 100644
@@ -11,13 +11,14 @@ def get_language_name(package):
 
     return lang
 
-DEPENDS = "unzip-native"
 RDEPENDS = "firefox"
 LANGUAGE = "${@get_language_name('${PN}')}"
 
 SRC_URI = "http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/linux-i686/xpi/${LANGUAGE}.xpi"
 S = "${WORKDIR}"
 
+NEED_UNZIP_FOR_UNPACK=1
+
 do_configure() {
 	unzip -o -q -d ${LANGUAGE} ${LANGUAGE}.xpi
 }
Signature · 1 line
1.5.6.5
#5 lore raw

Re: [PATCH] Use NEED_UNZIP_FOR_UNPACK variable for some recipes.

Quoted 1 line · Ihar Hrachyshka

+NEED_UNZIP_FOR_UNPACK=1

Why is this better than just declaring an explicit dependency of do_unpack on unzip-native? It's not obvious to me that the extra level of abstraction buys much in this situation.

p.

#6 lore raw

Re: [PATCH] Use NEED_UNZIP_FOR_UNPACK variable for some recipes.

Quoted 9 lines · Phil Blundell
Quoted 1 line · Ihar Hrachyshka

+NEED_UNZIP_FOR_UNPACK=1

Why is this better than just declaring an explicit dependency of do_unpack on unzip-native? It's not obvious to me that the extra level of abstraction buys much in this situation.

p.

We can drob the variable then. What about .zip extension auto detection?