diff mbox series

[3/3] runqueue: Add a RecipeCheckEvent

Message ID 20261127174616.2269186-3-richard.purdie@linuxfoundation.org
State New
Headers show
Series [1/3] uihelper: Fix exception when TaskStarted event handler breaks | expand

Commit Message

Richard Purdie Nov. 27, 2026, 5:46 p.m. UTC
This event triggers at the start of a build, once the task graph is known
and provides a list of the recipes which will execure alongside any custom
variable data that was requested to be cached in BB_CACHE_EXTRAVARS.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/runqueue.py | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 501fb92dc49..edb6c7d01ae 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -1608,6 +1608,8 @@  class RunQueue:
                                   ('bb.event.HeartbeatEvent',), data=self.cfgData)
                 self.dm_event_handler_registered = True
 
+            bb.event.fire(RecipeCheckEvent(self.rqdata), self.cooker.data)
+
             self.rqdata.init_progress_reporter.next_stage()
             self.rqexe = RunQueueExecute(self)
 
@@ -3316,6 +3318,15 @@  class PSIEvent(bb.event.Event):
         self.pressure_state = pressure_state
         self.pressure_values = pressure_values
 
+class RecipeCheckEvent(bb.event.Event):
+    def __init__(self, rqdata):
+        super().__init__()
+        recipedata = {}
+        for tid in rqdata.runtaskentries:
+            (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
+            recipedata[taskfn] = rqdata.dataCaches[mc].extravars[taskfn]
+        self.recipedata = recipedata
+
 class runQueuePipe():
     """
     Abstraction for a pipe between a worker thread and the server