Patchwork [1/2] bitbake/fetch2: add support for wrapper command

login
register
mail settings
Submitter Matthew McClintock
Date Jan. 12, 2012, 11:03 p.m.
Message ID <1326409412-15507-1-git-send-email-msm@freescale.com>
Download mbox | patch
Permalink /patch/19223/
State New
Headers show

Comments

Matthew McClintock - Jan. 12, 2012, 11:03 p.m.
cc: bitbake-devel@lists.openembedded.org
Signed-off-by: Matthew McClintock <msm@freescale.com>
---
 bitbake/lib/bb/fetch2/__init__.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Saul Wold - Jan. 16, 2012, 4:53 a.m.
On 01/12/2012 03:03 PM, Matthew McClintock wrote:
> cc: bitbake-devel@lists.openembedded.org
> Signed-off-by: Matthew McClintock<msm@freescale.com>
> ---
>   bitbake/lib/bb/fetch2/__init__.py |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
> index 3af56e5..1d7d5c7 100644
> --- a/bitbake/lib/bb/fetch2/__init__.py
> +++ b/bitbake/lib/bb/fetch2/__init__.py
> @@ -389,6 +389,8 @@ def runfetchcmd(cmd, d, quiet = False, cleanup = []):
>       Optionally remove the files/directories listed in cleanup upon failure
>       """
>
> +    cmd = "%s %s" % (bb.data.getVar("BB_FETCH_WRAPPER", d, True), cmd)
> +
I am guessing you really want a check here if BB_FETCH_WRAPPER is set, 
otherwise I am not sure this will work correctly, did you test without 
this new variable set?

Sau!

>       # Need to export PATH as binary could be in metadata paths
>       # rather than host provided
>       # Also include some other variables.
Richard Purdie - Jan. 16, 2012, 12:32 p.m.
On Sun, 2012-01-15 at 20:53 -0800, Saul Wold wrote:
> On 01/12/2012 03:03 PM, Matthew McClintock wrote:
> > cc: bitbake-devel@lists.openembedded.org
> > Signed-off-by: Matthew McClintock<msm@freescale.com>
> > ---
> >   bitbake/lib/bb/fetch2/__init__.py |    2 ++
> >   1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
> > index 3af56e5..1d7d5c7 100644
> > --- a/bitbake/lib/bb/fetch2/__init__.py
> > +++ b/bitbake/lib/bb/fetch2/__init__.py
> > @@ -389,6 +389,8 @@ def runfetchcmd(cmd, d, quiet = False, cleanup = []):
> >       Optionally remove the files/directories listed in cleanup upon failure
> >       """
> >
> > +    cmd = "%s %s" % (bb.data.getVar("BB_FETCH_WRAPPER", d, True), cmd)
> > +
> I am guessing you really want a check here if BB_FETCH_WRAPPER is set, 
> otherwise I am not sure this will work correctly, did you test without 
> this new variable set?

We've had this conversation on the bitbake list. I think Matthew has an
alternative fix to use instead of this so we'll likely drop this patch
anyway.

Cheers,

Richard
McClintock Matthew-B29882 - Jan. 16, 2012, 3:05 p.m.
On Mon, Jan 16, 2012 at 6:32 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>> > +    cmd = "%s %s" % (bb.data.getVar("BB_FETCH_WRAPPER", d, True), cmd)
>> > +
>> I am guessing you really want a check here if BB_FETCH_WRAPPER is set,
>> otherwise I am not sure this will work correctly, did you test without
>> this new variable set?
>
> We've had this conversation on the bitbake list. I think Matthew has an
> alternative fix to use instead of this so we'll likely drop this patch
> anyway.

Yes, please drop this patch.

-M

Patch

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 3af56e5..1d7d5c7 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -389,6 +389,8 @@  def runfetchcmd(cmd, d, quiet = False, cleanup = []):
     Optionally remove the files/directories listed in cleanup upon failure
     """
 
+    cmd = "%s %s" % (bb.data.getVar("BB_FETCH_WRAPPER", d, True), cmd)
+
     # Need to export PATH as binary could be in metadata paths
     # rather than host provided
     # Also include some other variables.