summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-16 07:54:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-17 14:11:05 +0100
commitd15652d78c2e6c3af4658726711332c1ee127427 (patch)
tree0ecc5c623cf135da09edbf1794439000fa66aa66 /bitbake/lib/bb/data.py
parent9a32eca022ece59a799a94d54d350cdc5a13eef1 (diff)
downloadpoky-d15652d78c2e6c3af4658726711332c1ee127427.tar.gz
poky-d15652d78c2e6c3af4658726711332c1ee127427.tar.bz2
poky-d15652d78c2e6c3af4658726711332c1ee127427.zip
bitbake: data: Optimise flag exclusion list handling
Move the variable lookup to the outer loop for performance, replacing a now unneeded parameter (after the previous changes). (Bitbake rev: 8a59a8707cecbde257fca169775ce8ff7709928b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r--bitbake/lib/bb/data.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 49bb5e997d..349fcfe878 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -285,7 +285,7 @@ def update_data(d):
"""Performs final steps upon the datastore, including application of overrides"""
d.finalize(parent = True)
-def build_dependencies(key, keys, shelldeps, vardepvals, d):
+def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
deps = set()
try:
if key[-1] == ']':
@@ -324,7 +324,6 @@ def build_dependencies(key, keys, shelldeps, vardepvals, d):
deps = deps | (keys & parser.execs)
# Add varflags, assuming an exclusion list is set
- varflagsexcl = d.getVar('BB_SIGNATURE_EXCLUDE_FLAGS', True)
if varflagsexcl:
varfdeps = []
for f in varflags:
@@ -345,14 +344,14 @@ def generate_dependencies(d):
keys = set(key for key in d if not key.startswith("__"))
shelldeps = set(key for key in d.getVar("__exportlist", False) if d.getVarFlag(key, "export") and not d.getVarFlag(key, "unexport"))
- vardepvals = set(key for key in keys if d.getVarFlag(key, "vardepvalue"))
+ varflagsexcl = d.getVar('BB_SIGNATURE_EXCLUDE_FLAGS', True)
deps = {}
values = {}
tasklist = d.getVar('__BBTASKS') or []
for task in tasklist:
- deps[task], values[task] = build_dependencies(task, keys, shelldeps, vardepvals, d)
+ deps[task], values[task] = build_dependencies(task, keys, shelldeps, varflagsexcl, d)
newdeps = deps[task]
seen = set()
while newdeps:
@@ -361,7 +360,7 @@ def generate_dependencies(d):
newdeps = set()
for dep in nextdeps:
if dep not in deps:
- deps[dep], values[dep] = build_dependencies(dep, keys, shelldeps, vardepvals, d)
+ deps[dep], values[dep] = build_dependencies(dep, keys, shelldeps, varflagsexcl, d)
newdeps |= deps[dep]
newdeps -= seen
#print "For %s: %s" % (task, str(deps[task]))