[bitbake-devel] [PATCH 30/30] toasterui: process CommandStarted event

brian avery avery.brian at gmail.com
Wed Dec 2 18:03:02 UTC 2015


From: Ed Bartosh <ed.bartosh at linux.intel.com>

Currently BRBE is known to toasterui only when build is
started. It't passed to it with BuildStarted event. This is
too late as if build fails earilier than build starts toasterui
can not inform Toaster about the failure.

Set BRBE as soon as it's provided by Toaster.
This should make toasterui to be able to inform Toaster
about early build failures, i.e. failures during parsing.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: brian avery <avery.brian at gmail.com>
---
 lib/bb/ui/toasterui.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/bb/ui/toasterui.py b/lib/bb/ui/toasterui.py
index 435cc2b..1fc5f1f 100644
--- a/lib/bb/ui/toasterui.py
+++ b/lib/bb/ui/toasterui.py
@@ -185,6 +185,13 @@ def main(server, eventHandler, params):
             # pylint: disable=protected-access
             # the code will look into the protected variables of the event; no easy way around this
 
+            # Set brbe as soon as it's provided by toaster
+            if isinstance(event, bb.command.CommandStarted):
+                if event.commandline[0] == 'setVariable' and \
+                   event.commandline[1] == 'TOASTER_BRBE':
+                    buildinfohelper.brbe = event.commandline[2]
+                continue
+
             # we treat ParseStarted as the first event of toaster-triggered
             # builds; that way we get the Build Configuration included in the log
             # and any errors that occur before BuildStarted is fired
-- 
1.9.1




More information about the bitbake-devel mailing list