From: Richard Purdie Date: Mon, 16 Sep 2013 07:53:40 +0000 (+0000) Subject: bitbake: data: Optimise flag lookup in build_dependencies X-Git-Tag: rev_ivi_2015_02_04~11003 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7f9b3b5b49b32010753f86105e005ea3c93dcf3;p=scm%2Fbb%2Ftizen-distro.git 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 --- diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py index 876f6ca..49bb5e9 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")