[bitbake-devel] [PATCH] data: Move warning code to the first loop for performance

Richard Purdie richard.purdie at linuxfoundation.org
Tue May 26 09:59:44 UTC 2015


On Tue, 2015-05-26 at 11:56 +0200, Bernhard Reutner-Fischer wrote:
> On May 25, 2015 9:53:52 AM GMT+02:00, Richard Purdie <richard.purdie at linuxfoundation.org> wrote:
> >By doing this we can take advantage of the expansion cache before
> >starting write operations on the data store.
> >
> >Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> >
> >diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
> >index 82eefef..218998a 100644
> >--- a/bitbake/lib/bb/data.py
> >+++ b/bitbake/lib/bb/data.py
> >@@ -156,17 +156,17 @@ def expandKeys(alterdata, readdata = None):
> >         if key == ekey:
> >             continue
> >         todolist[key] = ekey
> >+        newval = alterdata.getVar(ekey, 0)
> >+        if newval:
> >+            val = alterdata.getVar(key, 0)
> >+            if val is not None and newval is not None:
> 
> newval cannot ever be None in this if.

True, to be fair I just moved the code although I probably was
responsible for the original too.

I'll tweak it, thanks.

Cheers,

Richard





More information about the bitbake-devel mailing list