runqueue: Fix runall all bug
PATCH v2 1/1 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.
Signed-off-by Richard Purdie <[email protected]>
--- lib/bb/runqueue.py | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-)
lib/bb/runqueue.py +24 -18
@@ -1004,26 +1004,32 @@ class RunQueueData: # Handle --runall if self.cooker.configuration.runall: # re-run the mark_active and then drop unused tasks from new list - reduced_tasklist = set(self.runtaskentries.keys()) - for tid in list(self.runtaskentries.keys()): - if tid not in runq_build: - reduced_tasklist.remove(tid) - runq_build = {} - for task in self.cooker.configuration.runall: - if not task.startswith("do_"): - task = "do_{0}".format(task) - runall_tids = set() - for tid in reduced_tasklist: - wanttid = "{0}:{1}".format(fn_from_tid(tid), task) - if wanttid in self.runtaskentries: - runall_tids.add(wanttid) + runall_tids = set() + added = True + while added: + reduced_tasklist = set(self.runtaskentries.keys()) + for tid in list(self.runtaskentries.keys()): + if tid not in runq_build: + reduced_tasklist.remove(tid) + runq_build = {} - for tid in list(runall_tids): - mark_active(tid, 1) - self.target_tids.append(tid) - if self.cooker.configuration.force: - invalidate_task(tid, False) + orig = runall_tids + runall_tids = set() + for task in self.cooker.configuration.runall: + if not task.startswith("do_"): + task = "do_{0}".format(task) + for tid in reduced_tasklist: + wanttid = "{0}:{1}".format(fn_from_tid(tid), task) + if wanttid in self.runtaskentries: + runall_tids.add(wanttid) + + for tid in list(runall_tids): + mark_active(tid, 1) + self.target_tids.append(tid) + if self.cooker.configuration.force: + invalidate_task(tid, False) + added = runall_tids - orig delcount = set() for tid in list(self.runtaskentries.keys()):
Signature · 1 line
2.39.2
Quoted 6 lines · Richard Purdie
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.
Signed-off-by Richard Purdie <[email protected]>
Can confirm this fixes my issue with deep RDEPENDS chains.
So in case you care about that, have a
Tested-by Jonas Gorski <[email protected]>
and since it was me on IRC as well a
Reported-by Jonas Gorski <[email protected]>
Thanks for the quick fix!
Best regards,
Jonas
Signature · 19 lines
BISDN GmbH Körnerstraße 7-10 10785 Berlin Germany Phone: +49-30-6108-1-6100 Managing Directors: Dr.-Ing. Hagen Woesner, Andreas Köpsel Commercial register: Amtsgericht Berlin-Charlottenburg HRB 141569 B VAT ID No: DE283257294