diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-11 14:01:46 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-12 11:59:36 +0000 |
commit | 61182659c212db24e52cdbcdbb043c7b0de86094 (patch) | |
tree | b6dfe0fa5bc973d5e43eaac02cbd118d2bcce1c2 | |
parent | dda251dfc2dc7755bf1e909ec8eb6a708e2cde6d (diff) | |
download | poky-61182659c212db24e52cdbcdbb043c7b0de86094.tar.gz |
bitbake: runqueue: Fix runall all bug
Where chains of RDEPENDS are multiple levels deep, the runall code was not
accounting for this and recursing deeply enough to gather all dependencies.
Fix this by iterating over the result until no more dependencies are found.
Tested-by: Jonas Gorski <jonas.gorski@bisdn.de>
Reported-by: Jonas Gorski <jonas.gorski@bisdn.de>
(Bitbake rev: 966f25dfc23a6d17b2b6d3e0100e9ae264f99025)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 9e3a87c0e8..af11e9a8f4 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -1004,26 +1004,32 @@ class RunQueueData: | |||
1004 | # Handle --runall | 1004 | # Handle --runall |
1005 | if self.cooker.configuration.runall: | 1005 | if self.cooker.configuration.runall: |
1006 | # re-run the mark_active and then drop unused tasks from new list | 1006 | # re-run the mark_active and then drop unused tasks from new list |
1007 | reduced_tasklist = set(self.runtaskentries.keys()) | ||
1008 | for tid in list(self.runtaskentries.keys()): | ||
1009 | if tid not in runq_build: | ||
1010 | reduced_tasklist.remove(tid) | ||
1011 | runq_build = {} | ||
1012 | 1007 | ||
1013 | for task in self.cooker.configuration.runall: | 1008 | runall_tids = set() |
1014 | if not task.startswith("do_"): | 1009 | added = True |
1015 | task = "do_{0}".format(task) | 1010 | while added: |
1016 | runall_tids = set() | 1011 | reduced_tasklist = set(self.runtaskentries.keys()) |
1017 | for tid in reduced_tasklist: | 1012 | for tid in list(self.runtaskentries.keys()): |
1018 | wanttid = "{0}:{1}".format(fn_from_tid(tid), task) | 1013 | if tid not in runq_build: |
1019 | if wanttid in self.runtaskentries: | 1014 | reduced_tasklist.remove(tid) |
1020 | runall_tids.add(wanttid) | 1015 | runq_build = {} |
1021 | 1016 | ||
1022 | for tid in list(runall_tids): | 1017 | orig = runall_tids |
1023 | mark_active(tid, 1) | 1018 | runall_tids = set() |
1024 | self.target_tids.append(tid) | 1019 | for task in self.cooker.configuration.runall: |
1025 | if self.cooker.configuration.force: | 1020 | if not task.startswith("do_"): |
1026 | invalidate_task(tid, False) | 1021 | task = "do_{0}".format(task) |
1022 | for tid in reduced_tasklist: | ||
1023 | wanttid = "{0}:{1}".format(fn_from_tid(tid), task) | ||
1024 | if wanttid in self.runtaskentries: | ||
1025 | runall_tids.add(wanttid) | ||
1026 | |||
1027 | for tid in list(runall_tids): | ||
1028 | mark_active(tid, 1) | ||
1029 | self.target_tids.append(tid) | ||
1030 | if self.cooker.configuration.force: | ||
1031 | invalidate_task(tid, False) | ||
1032 | added = runall_tids - orig | ||
1027 | 1033 | ||
1028 | delcount = set() | 1034 | delcount = set() |
1029 | for tid in list(self.runtaskentries.keys()): | 1035 | for tid in list(self.runtaskentries.keys()): |