summaryrefslogtreecommitdiffstats
path: root/lib/bb/build.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/build.py
parent8f4733257ad665aa7c7e7061c543379d5e4e3af2 (diff)
downloadopenembedded-core-contrib-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/build.py')
-rw-r--r--lib/bb/build.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 92c45a38c9..6b395264b6 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -622,7 +622,7 @@ def stampfile(taskname, d, file_name = None):
"""
return stamp_internal(taskname, d, file_name)
-def add_tasks(tasklist, d):
+def add_tasks(tasklist, deltasklist, d):
task_deps = d.getVar('_task_deps')
if not task_deps:
task_deps = {}
@@ -633,6 +633,10 @@ def add_tasks(tasklist, d):
for task in tasklist:
task = d.expand(task)
+
+ if task in deltasklist:
+ continue
+
d.setVarFlag(task, 'task', 1)
if not task in task_deps['tasks']: