summaryrefslogtreecommitdiffstats
path: root/bitbake/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 17:08:07 +0000
commit8a82a3835cb5b38812da720914d5f47a7cd443e8 (patch)
tree4f3a44bba1744d5f2a1bc33d4955f6e8e77c6fb6 /bitbake/lib/bb/build.py
parent0f2041142e2513ee284e29f1b88e3767c2522f90 (diff)
downloadpoky-8a82a3835cb5b38812da720914d5f47a7cd443e8.tar.gz
bitbake: 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. (Bitbake rev: acecbde6fb70ff3c96deab3cdf819d8442e87ed4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r--bitbake/lib/bb/build.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 92c45a38c9..6b395264b6 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -622,7 +622,7 @@ def stampfile(taskname, d, file_name = None):
622 """ 622 """
623 return stamp_internal(taskname, d, file_name) 623 return stamp_internal(taskname, d, file_name)
624 624
625def add_tasks(tasklist, d): 625def add_tasks(tasklist, deltasklist, d):
626 task_deps = d.getVar('_task_deps') 626 task_deps = d.getVar('_task_deps')
627 if not task_deps: 627 if not task_deps:
628 task_deps = {} 628 task_deps = {}
@@ -633,6 +633,10 @@ def add_tasks(tasklist, d):
633 633
634 for task in tasklist: 634 for task in tasklist:
635 task = d.expand(task) 635 task = d.expand(task)
636
637 if task in deltasklist:
638 continue
639
636 d.setVarFlag(task, 'task', 1) 640 d.setVarFlag(task, 'task', 1)
637 641
638 if not task in task_deps['tasks']: 642 if not task in task_deps['tasks']: