All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fixed concurrency problem for ZIP packed recipes.
@ 2009-09-07 13:10 Ihar Hrachyshka
  2009-09-07 13:10 ` [PATCH] Use automatic unzip-native dependency detection Ihar Hrachyshka
  0 siblings, 1 reply; 8+ messages in thread
From: Ihar Hrachyshka @ 2009-09-07 13:10 UTC (permalink / raw)
  To: openembedded-devel

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>
---
 classes/base.bbclass |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/classes/base.bbclass b/classes/base.bbclass
index d29ba4b..bdee5b2 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -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)
-- 
1.5.6.5




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] Use automatic unzip-native dependency detection.
  2009-09-07 13:10 [PATCH] Fixed concurrency problem for ZIP packed recipes Ihar Hrachyshka
@ 2009-09-07 13:10 ` Ihar Hrachyshka
  2009-09-07 13:10   ` [PATCH] Fixed checksum for tda1004x-firmware Ihar Hrachyshka
  0 siblings, 1 reply; 8+ messages in thread
From: Ihar Hrachyshka @ 2009-09-07 13:10 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
---
 recipes/jpeg/jasper_1.900.1.bb       |    1 -
 recipes/miglayout/miglayout_3.0.3.bb |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/recipes/jpeg/jasper_1.900.1.bb b/recipes/jpeg/jasper_1.900.1.bb
index 9f1f5ee..a71dd68 100644
--- a/recipes/jpeg/jasper_1.900.1.bb
+++ b/recipes/jpeg/jasper_1.900.1.bb
@@ -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"
 
diff --git a/recipes/miglayout/miglayout_3.0.3.bb b/recipes/miglayout/miglayout_3.0.3.bb
index 2450a7e..87ab0f2 100644
--- a/recipes/miglayout/miglayout_3.0.3.bb
+++ b/recipes/miglayout/miglayout_3.0.3.bb
@@ -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 {} \;
-- 
1.5.6.5




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] Fixed checksum for tda1004x-firmware.
  2009-09-07 13:10 ` [PATCH] Use automatic unzip-native dependency detection Ihar Hrachyshka
@ 2009-09-07 13:10   ` Ihar Hrachyshka
  2009-09-07 13:10     ` [PATCH] Use NEED_UNZIP_FOR_UNPACK variable for some recipes Ihar Hrachyshka
  2009-09-09 12:24     ` [PATCH] Fixed checksum for tda1004x-firmware Stanislav Brabec
  0 siblings, 2 replies; 8+ messages in thread
From: Ihar Hrachyshka @ 2009-09-07 13:10 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
---
 conf/checksums.ini |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/conf/checksums.ini b/conf/checksums.ini
index 053a2ad..bb075cc 100644
--- a/conf/checksums.ini
+++ b/conf/checksums.ini
@@ -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
-- 
1.5.6.5




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] Use NEED_UNZIP_FOR_UNPACK variable for some recipes.
  2009-09-07 13:10   ` [PATCH] Fixed checksum for tda1004x-firmware Ihar Hrachyshka
@ 2009-09-07 13:10     ` Ihar Hrachyshka
  2009-09-09 13:05       ` Phil Blundell
  2009-09-09 12:24     ` [PATCH] Fixed checksum for tda1004x-firmware Stanislav Brabec
  1 sibling, 1 reply; 8+ messages in thread
From: Ihar Hrachyshka @ 2009-09-07 13:10 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
---
 recipes/misc-binary-only/tda1004x-firmware.bb |    3 ++-
 recipes/mozilla/firefox-l10n.inc              |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/recipes/misc-binary-only/tda1004x-firmware.bb b/recipes/misc-binary-only/tda1004x-firmware.bb
index 1e4d685..ff60717 100644
--- a/recipes/misc-binary-only/tda1004x-firmware.bb
+++ b/recipes/misc-binary-only/tda1004x-firmware.bb
@@ -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
 
diff --git a/recipes/mozilla/firefox-l10n.inc b/recipes/mozilla/firefox-l10n.inc
index 31555e3..cecd53a 100644
--- a/recipes/mozilla/firefox-l10n.inc
+++ b/recipes/mozilla/firefox-l10n.inc
@@ -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
 }
-- 
1.5.6.5




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fixed checksum for tda1004x-firmware.
  2009-09-07 13:10   ` [PATCH] Fixed checksum for tda1004x-firmware Ihar Hrachyshka
  2009-09-07 13:10     ` [PATCH] Use NEED_UNZIP_FOR_UNPACK variable for some recipes Ihar Hrachyshka
@ 2009-09-09 12:24     ` Stanislav Brabec
  1 sibling, 0 replies; 8+ messages in thread
From: Stanislav Brabec @ 2009-09-09 12:24 UTC (permalink / raw)
  To: openembedded-devel

Ihar Hrachyshka wrote:
> Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
> ---
>  conf/checksums.ini |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/conf/checksums.ini b/conf/checksums.ini
> index 053a2ad..bb075cc 100644
> --- a/conf/checksums.ini
> +++ b/conf/checksums.ini
> @@ -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.

-- 
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Use NEED_UNZIP_FOR_UNPACK variable for some recipes.
  2009-09-07 13:10     ` [PATCH] Use NEED_UNZIP_FOR_UNPACK variable for some recipes Ihar Hrachyshka
@ 2009-09-09 13:05       ` Phil Blundell
  2009-09-10  7:48         ` Ihar Hrachyshka
  0 siblings, 1 reply; 8+ messages in thread
From: Phil Blundell @ 2009-09-09 13:05 UTC (permalink / raw)
  To: openembedded-devel

On Mon, 2009-09-07 at 16:10 +0300, Ihar Hrachyshka wrote:
> +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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Use NEED_UNZIP_FOR_UNPACK variable for some recipes.
  2009-09-09 13:05       ` Phil Blundell
@ 2009-09-10  7:48         ` Ihar Hrachyshka
  0 siblings, 0 replies; 8+ messages in thread
From: Ihar Hrachyshka @ 2009-09-10  7:48 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Sep 09, 2009 at 02:05:27PM +0100, Phil Blundell wrote:
> On Mon, 2009-09-07 at 16:10 +0300, Ihar Hrachyshka wrote:
> > +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?



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] Fixed concurrency problem for ZIP packed recipes.
@ 2011-07-15 17:15 Tom Rini
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2011-07-15 17:15 UTC (permalink / raw)
  To: openembedded-core; +Cc: Koen Kooi, Ihar Hrachyshka

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(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 0c2c546..2bd9cc2 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_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)
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-15 17:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-07 13:10 [PATCH] Fixed concurrency problem for ZIP packed recipes Ihar Hrachyshka
2009-09-07 13:10 ` [PATCH] Use automatic unzip-native dependency detection Ihar Hrachyshka
2009-09-07 13:10   ` [PATCH] Fixed checksum for tda1004x-firmware Ihar Hrachyshka
2009-09-07 13:10     ` [PATCH] Use NEED_UNZIP_FOR_UNPACK variable for some recipes Ihar Hrachyshka
2009-09-09 13:05       ` Phil Blundell
2009-09-10  7:48         ` Ihar Hrachyshka
2009-09-09 12:24     ` [PATCH] Fixed checksum for tda1004x-firmware Stanislav Brabec
2011-07-15 17:15 [PATCH] Fixed concurrency problem for ZIP packed recipes Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.