summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-16 07:53:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-17 14:09:38 +0100
commit1bf3aee698ad35f6815ea2c75471a96511a29d55 (patch)
tree0b91702fc4648374f5ad4fe6a759ba85a553dd9c
parenteba1e9545cc933820d40de96f023b2307b3c4d0b (diff)
downloadbitbake-1bf3aee698ad35f6815ea2c75471a96511a29d55.tar.gz
data: Optimise flag lookup in build_dependencies
When looking up flag variable dependencies, large chunks of the function aren't needed. Optimise the function flow accordingly for speed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/data.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py
index 876f6ca54..49bb5e997 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -291,10 +291,13 @@ def build_dependencies(key, keys, shelldeps, vardepvals, d):
if key[-1] == ']':
vf = key[:-1].split('[')
value = d.getVarFlag(vf[0], vf[1], False)
- else:
- value = d.getVar(key, False)
+ parser = d.expandWithRefs(value, key)
+ deps |= parser.references
+ deps = deps | (keys & parser.execs)
+ return deps, value
varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude"]) or {}
vardeps = varflags.get("vardeps")
+ value = d.getVar(key, False)
if "vardepvalue" in varflags:
value = varflags.get("vardepvalue")