summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/parse/parse_py/BBHandler.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py/BBHandler.py')
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index aaa262d3e..0f19f9a5d 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -176,15 +176,23 @@ def handle(fn, d, include = 0):
if bb.event.register(var,handler) == bb.event.Registered:
all_handlers[var] = handler
+ tasklist = {}
for var in data.getVar('__BBTASKS', d) or []:
+ if var not in tasklist:
+ tasklist[var] = []
deps = data.getVarFlag(var, 'deps', d) or []
+ for p in deps:
+ if p not in tasklist[var]:
+ tasklist[var].append(p)
+
postdeps = data.getVarFlag(var, 'postdeps', d) or []
- bb.build.add_task(var, deps, d)
for p in postdeps:
- pdeps = data.getVarFlag(p, 'deps', d) or []
- pdeps.append(var)
- data.setVarFlag(p, 'deps', pdeps, d)
- bb.build.add_task(p, pdeps, d)
+ if p not in tasklist:
+ tasklist[p] = []
+ if var not in tasklist[p]:
+ tasklist[p].append(var)
+
+ bb.build.add_tasks(tasklist, d)
# now add the handlers
if not len(all_handlers) == 0: