aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/parse/parse_py/BBHandler.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-18 10:44:30 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-18 11:23:23 +0000
commitacecbde6fb70ff3c96deab3cdf819d8442e87ed4 (patch)
tree172ae58230cf22e249668ff354c65ef28ec0594b /lib/bb/parse/parse_py/BBHandler.py
parent8f4733257ad665aa7c7e7061c543379d5e4e3af2 (diff)
downloadbitbake-acecbde6fb70ff3c96deab3cdf819d8442e87ed4.tar.gz
ast/BBHandler/build: Add support for removing tasks (deltask)
Back in the depths of time we did support task removal. In the pre AST days it was nearly impossible to continue supporting it, it wasn't used so it was dropped. With the modern codebase we can easily now support deltask and it would be very useful within the metadata since it can massively simplify dependency trees. As an example, a core-image-sato had 47703 inter task dependencies before this patch and a patch to native.bbclass, afterwards with the noexec tasks deleted, we had 29883. Such a significant simplification is worthwhile and justifies adding a deltask operation to the system. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/parse/parse_py/BBHandler.py')
-rw-r--r--lib/bb/parse/parse_py/BBHandler.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py
index 7cba64959..408890e48 100644
--- a/lib/bb/parse/parse_py/BBHandler.py
+++ b/lib/bb/parse/parse_py/BBHandler.py
@@ -42,6 +42,7 @@ __func_start_regexp__ = re.compile( r"(((?P<py>python)|(?P<fr>fakeroot))\s*)*
__inherit_regexp__ = re.compile( r"inherit\s+(.+)" )
__export_func_regexp__ = re.compile( r"EXPORT_FUNCTIONS\s+(.+)" )
__addtask_regexp__ = re.compile("addtask\s+(?P<func>\w+)\s*((before\s*(?P<before>((.*(?=after))|(.*))))|(after\s*(?P<after>((.*(?=before))|(.*)))))*")
+__deltask_regexp__ = re.compile("deltask\s+(?P<func>\w+)")
__addhandler_regexp__ = re.compile( r"addhandler\s+(.+)" )
__def_regexp__ = re.compile( r"def\s+(\w+).*:" )
__python_func_regexp__ = re.compile( r"(\s+.*)|(^$)" )
@@ -243,6 +244,11 @@ def feeder(lineno, s, fn, root, statements):
ast.handleAddTask(statements, fn, lineno, m)
return
+ m = __deltask_regexp__.match(s)
+ if m:
+ ast.handleDelTask(statements, fn, lineno, m)
+ return
+
m = __addhandler_regexp__.match(s)
if m:
ast.handleBBHandlers(statements, fn, lineno, m)