diff options
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
| -rw-r--r-- | bitbake/lib/bb/runqueue.py | 49 |
1 files changed, 38 insertions, 11 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index d7acfabef4..48df013155 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
| @@ -841,30 +841,57 @@ class RunQueueData: | |||
| 841 | # | 841 | # |
| 842 | # Once all active tasks are marked, prune the ones we don't need. | 842 | # Once all active tasks are marked, prune the ones we don't need. |
| 843 | 843 | ||
| 844 | delcount = 0 | 844 | delcount = {} |
| 845 | for tid in list(self.runtaskentries.keys()): | 845 | for tid in list(self.runtaskentries.keys()): |
| 846 | if tid not in runq_build: | 846 | if tid not in runq_build: |
| 847 | delcount[tid] = self.runtaskentries[tid] | ||
| 847 | del self.runtaskentries[tid] | 848 | del self.runtaskentries[tid] |
| 848 | delcount += 1 | ||
| 849 | 849 | ||
| 850 | self.init_progress_reporter.next_stage() | 850 | # Handle --runall |
| 851 | if self.cooker.configuration.runall: | ||
| 852 | # re-run the mark_active and then drop unused tasks from new list | ||
| 853 | runq_build = {} | ||
| 854 | |||
| 855 | for task in self.cooker.configuration.runall: | ||
| 856 | runall_tids = set() | ||
| 857 | for tid in list(self.runtaskentries): | ||
| 858 | wanttid = fn_from_tid(tid) + ":do_%s" % task | ||
| 859 | if wanttid in delcount: | ||
| 860 | self.runtaskentries[wanttid] = delcount[wanttid] | ||
| 861 | if wanttid in self.runtaskentries: | ||
| 862 | runall_tids.add(wanttid) | ||
| 863 | |||
| 864 | for tid in list(runall_tids): | ||
| 865 | mark_active(tid,1) | ||
| 866 | |||
| 867 | for tid in list(self.runtaskentries.keys()): | ||
| 868 | if tid not in runq_build: | ||
| 869 | delcount[tid] = self.runtaskentries[tid] | ||
| 870 | del self.runtaskentries[tid] | ||
| 851 | 871 | ||
| 852 | if self.cooker.configuration.runall is not None: | 872 | if len(self.runtaskentries) == 0: |
| 853 | runall = "do_%s" % self.cooker.configuration.runall | 873 | bb.msg.fatal("RunQueue", "Could not find any tasks with the tasknames %s to run within the recipes of the taskgraphs of the targets %s" % (str(self.cooker.configuration.runall), str(self.targets))) |
| 854 | runall_tids = { k: v for k, v in self.runtaskentries.items() if taskname_from_tid(k) == runall } | ||
| 855 | 874 | ||
| 875 | self.init_progress_reporter.next_stage() | ||
| 876 | |||
| 877 | # Handle runonly | ||
| 878 | if self.cooker.configuration.runonly: | ||
| 856 | # re-run the mark_active and then drop unused tasks from new list | 879 | # re-run the mark_active and then drop unused tasks from new list |
| 857 | runq_build = {} | 880 | runq_build = {} |
| 858 | for tid in list(runall_tids): | 881 | |
| 859 | mark_active(tid,1) | 882 | for task in self.cooker.configuration.runonly: |
| 883 | runonly_tids = { k: v for k, v in self.runtaskentries.items() if taskname_from_tid(k) == "do_%s" % task } | ||
| 884 | |||
| 885 | for tid in list(runonly_tids): | ||
| 886 | mark_active(tid,1) | ||
| 860 | 887 | ||
| 861 | for tid in list(self.runtaskentries.keys()): | 888 | for tid in list(self.runtaskentries.keys()): |
| 862 | if tid not in runq_build: | 889 | if tid not in runq_build: |
| 890 | delcount[tid] = self.runtaskentries[tid] | ||
| 863 | del self.runtaskentries[tid] | 891 | del self.runtaskentries[tid] |
| 864 | delcount += 1 | ||
| 865 | 892 | ||
| 866 | if len(self.runtaskentries) == 0: | 893 | if len(self.runtaskentries) == 0: |
| 867 | bb.msg.fatal("RunQueue", "No remaining tasks to run for build target %s with runall %s" % (target, runall)) | 894 | bb.msg.fatal("RunQueue", "Could not find any tasks with the tasknames %s to run within the taskgraphs of the targets %s" % (str(self.cooker.configuration.runonly), str(self.targets))) |
| 868 | 895 | ||
| 869 | # | 896 | # |
| 870 | # Step D - Sanity checks and computation | 897 | # Step D - Sanity checks and computation |
| @@ -877,7 +904,7 @@ class RunQueueData: | |||
| 877 | else: | 904 | else: |
| 878 | bb.msg.fatal("RunQueue", "No active tasks and not in --continue mode?! Please report this bug.") | 905 | bb.msg.fatal("RunQueue", "No active tasks and not in --continue mode?! Please report this bug.") |
| 879 | 906 | ||
| 880 | logger.verbose("Pruned %s inactive tasks, %s left", delcount, len(self.runtaskentries)) | 907 | logger.verbose("Pruned %s inactive tasks, %s left", len(delcount), len(self.runtaskentries)) |
| 881 | 908 | ||
| 882 | logger.verbose("Assign Weightings") | 909 | logger.verbose("Assign Weightings") |
| 883 | 910 | ||
