summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data.py
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:11:05 +0100
commit9a32eca022ece59a799a94d54d350cdc5a13eef1 (patch)
tree518d1b1468ac8503411bbc73e4024b58687dea76 /bitbake/lib/bb/data.py
parentd7e7b991ce42439e2df8531859fafcd4a91f2ed9 (diff)
downloadpoky-9a32eca022ece59a799a94d54d350cdc5a13eef1.tar.gz
poky-9a32eca022ece59a799a94d54d350cdc5a13eef1.tar.bz2
poky-9a32eca022ece59a799a94d54d350cdc5a13eef1.zip
bitbake: 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. (Bitbake rev: 1bf3aee698ad35f6815ea2c75471a96511a29d55) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r--bitbake/lib/bb/data.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 876f6ca542..49bb5e997d 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/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")