[Toaster] [PATCH 28/30] command: add CommandStarted event

Ed Bartosh ed.bartosh at linux.intel.com
Thu Nov 26 03:27:50 PST 2015


This event will be used by toasterui to set BRBE build parameter
as soon as it's provided to bitbake server by Toaster.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
 bitbake/lib/bb/command.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 74106d1..78ce03a 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -31,6 +31,11 @@ Commands are queued in a CommandQueue
 import bb.event
 import bb.cooker
 
+class CommandStarted(bb.event.Event):
+    def  __init__(self, commandline):
+        bb.event.Event.__init__(self)
+        self.commandline = commandline
+
 class CommandCompleted(bb.event.Event):
     pass
 
@@ -60,6 +65,7 @@ class Command:
         self.currentAsyncCommand = None
 
     def runCommand(self, commandline, ro_only = False):
+        bb.event.fire(CommandStarted(commandline), self.cooker.expanded_data)
         command = commandline.pop(0)
         if hasattr(CommandsSync, command):
             # Can run synchronous commands straight away
-- 
2.1.4



More information about the toaster mailing list