Patchwork [v3,1/1] Fixed concurrency problem for ZIP packed recipes.

login
register
mail settings
Submitter Tom Rini
Date July 18, 2011, 5 p.m.
Message ID <7da7d67b36cfd010e56a401f51e20b81e20ddba0.1311008331.git.tom_rini@mentor.com>
Download mbox | patch
Permalink /patch/7761/
State New, archived
Headers show

Comments

Tom Rini - July 18, 2011, 5 p.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.

(oe.dev has a NEED_UNZIP_FOR_UNPACK variable we did not bring over)

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 |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
Richard Purdie - July 19, 2011, 4:57 p.m.
On Mon, 2011-07-18 at 10:00 -0700, Tom Rini wrote:
> 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.
> 
> (oe.dev has a NEED_UNZIP_FOR_UNPACK variable we did not bring over)
> 
> 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 |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index 0c2c546..0347b90 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -354,6 +354,14 @@ 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
> +    src_uri = bb.data.getVar('SRC_URI', d, 1)
> +
> +    if ".zip" in src_uri:
> +        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)

Any reason we can't use the value of SRC_URI we already have in the
srcuri variable a few lines above this? :)

Assuming you're ok with the change I can just fix this to save it
bouncing around the lists further...

Cheers,

Richard
Richard Purdie - July 19, 2011, 5:04 p.m.
On Mon, 2011-07-18 at 10:00 -0700, Tom Rini wrote:
> 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.
> 
> (oe.dev has a NEED_UNZIP_FOR_UNPACK variable we did not bring over)
> 
> 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 |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index 0c2c546..0347b90 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -354,6 +354,14 @@ 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
> +    src_uri = bb.data.getVar('SRC_URI', d, 1)
> +
> +    if ".zip" in src_uri:
> +        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)

I merged this with a tweak to use the already existing srcuri variable
after talking to Tom on irc.

Cheers,

Richard

Patch

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 0c2c546..0347b90 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -354,6 +354,14 @@  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
+    src_uri = bb.data.getVar('SRC_URI', d, 1)
+
+    if ".zip" in src_uri:
+        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)