summaryrefslogtreecommitdiffstats
path: root/bitbake
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
parentd7e7b991ce42439e2df8531859fafcd4a91f2ed9 (diff)
downloadpoky-9a32eca022ece59a799a94d54d350cdc5a13eef1.tar.gz
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')
-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):
291 if key[-1] == ']': 291 if key[-1] == ']':
292 vf = key[:-1].split('[') 292 vf = key[:-1].split('[')
293 value = d.getVarFlag(vf[0], vf[1], False) 293 value = d.getVarFlag(vf[0], vf[1], False)
294 else: 294 parser = d.expandWithRefs(value, key)
295 value = d.getVar(key, False) 295 deps |= parser.references
296 deps = deps | (keys & parser.execs)
297 return deps, value
296 varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude"]) or {} 298 varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude"]) or {}
297 vardeps = varflags.get("vardeps") 299 vardeps = varflags.get("vardeps")
300 value = d.getVar(key, False)
298 301
299 if "vardepvalue" in varflags: 302 if "vardepvalue" in varflags:
300 value = varflags.get("vardepvalue") 303 value = varflags.get("vardepvalue")