From: "Zhai, Edwin" <edwin.zhai@intel.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: poky@yoctoproject.org
Subject: Re: [PATCH 0/1] Fix sstate error
Date: Fri, 11 Feb 2011 22:42:45 +0800 [thread overview]
Message-ID: <4D554AE5.2030402@intel.com> (raw)
In-Reply-To: <1297433374.20543.10587.camel@rex>
Richard Purdie wrote:
>
> On Fri, 2011-02-11 at 22:01 +0800, Zhai Edwin wrote:
> > From: Zhai Edwin <edwin.zhai@intel.com>
> >
> > RP,
> > Current sstate's fetch code doesn't reflect latest fetcher changes,
> so old
> > fetch style cause exception and fail silently. This patch fix it.
>
> I've merged the fix to master, thanks.
>
> > Another issue is "import xxx" in python function from sstate.bbclass
> can only
> > sit in the head of the function, else have UnboundLocalError: "local
> variable
> > XXX referenced before assignment".
> >
> > We don't know if it is a known limitation of *.bbclass or some
> potential bug.
> > Can you give some comments?
>
> Good question. The import should really always be at the top of the code
> block in question so I think its a python constraint, not a .bbclass
> one...
>
Seems in-middle "import" is widely used in other *.py,
See bitbake/lib/bb/fetch/ssh.py,
def go(self, url, urldata, d):
..........................
import commands
cmd = 'scp -B -r %s %s %s/' % (
port,
commands.mkarg(fr),
commands.mkarg(ldir)
)
I found only bb has such limitation:all the "import bb.xxx" are in the
head of function, and adding stuff before it will cause same problem.
Anything special for bb module?
> Cheers,
>
> Richard
>
>
>
>
>
>
>
next prev parent reply other threads:[~2011-02-11 14:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 14:01 [PATCH 0/1] Fix sstate error Zhai Edwin
2011-02-11 14:01 ` [PATCH 1/1] sstate: Fix bugs after new fetcher Zhai Edwin
2011-02-11 14:09 ` [PATCH 0/1] Fix sstate error Richard Purdie
2011-02-11 14:42 ` Zhai, Edwin [this message]
2011-02-11 14:54 ` Richard Purdie
2011-02-12 0:20 ` Zhai, Edwin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D554AE5.2030402@intel.com \
--to=edwin.zhai@intel.com \
--cc=poky@yoctoproject.org \
--cc=richard.purdie@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.