summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r--bitbake/lib/bb/parse/ast.py33
1 files changed, 2 insertions, 31 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index 2036cd43fe..a2020532ea 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -235,29 +235,7 @@ class AddTaskNode(AstNode):
235 self.after = after 235 self.after = after
236 236
237 def eval(self, data): 237 def eval(self, data):
238 var = self.func 238 bb.build.addtask(self.func, self.before, self.after, data)
239 if self.func[:3] != "do_":
240 var = "do_" + self.func
241
242 data.setVarFlag(var, "task", 1)
243 bbtasks = data.getVar('__BBTASKS') or []
244 if not var in bbtasks:
245 bbtasks.append(var)
246 data.setVar('__BBTASKS', bbtasks)
247
248 existing = data.getVarFlag(var, "deps") or []
249 if self.after is not None:
250 # set up deps for function
251 for entry in self.after.split():
252 if entry not in existing:
253 existing.append(entry)
254 data.setVarFlag(var, "deps", existing)
255 if self.before is not None:
256 # set up things that depend on this func
257 for entry in self.before.split():
258 existing = data.getVarFlag(entry, "deps") or []
259 if var not in existing:
260 data.setVarFlag(entry, "deps", [var] + existing)
261 239
262class DelTaskNode(AstNode): 240class DelTaskNode(AstNode):
263 def __init__(self, filename, lineno, func): 241 def __init__(self, filename, lineno, func):
@@ -265,14 +243,7 @@ class DelTaskNode(AstNode):
265 self.func = func 243 self.func = func
266 244
267 def eval(self, data): 245 def eval(self, data):
268 var = self.func 246 bb.build.deltask(self.func, data)
269 if self.func[:3] != "do_":
270 var = "do_" + self.func
271
272 bbtasks = data.getVar('__BBDELTASKS') or []
273 if not var in bbtasks:
274 bbtasks.append(var)
275 data.setVar('__BBDELTASKS', bbtasks)
276 247
277class BBHandlerNode(AstNode): 248class BBHandlerNode(AstNode):
278 def __init__(self, filename, lineno, fns): 249 def __init__(self, filename, lineno, fns):