]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toasterui: add brbe parameter to buildinfohelper
authorEd Bartosh <ed.bartosh@linux.intel.com>
Wed, 6 Apr 2016 16:46:14 +0000 (17:46 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 6 Apr 2016 22:00:10 +0000 (23:00 +0100)
In current toaster code BRBE(build request:build environment) value
is passed from toaster to buildinfohelper through the 'SetBRBE' event.

Passing it through environment variable is easier as it doesn't
involve rpc communication between toaster and bitbake server.
It also eliminates the need in running bitbake observer process.

Added parameter 'brbe' to BuildInfoHelper.__init__
Used environment variable TOASTER_BRBE to set brbe for
buildinfohelper object.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/ui/buildinfohelper.py
lib/bb/ui/toasterui.py

index ed43f4c10d857cd9ba7f3662edb29c75e7afaa9d..448f263f5a8af9e0fad81220282cdd9f681e95c6 100644 (file)
@@ -849,7 +849,7 @@ class BuildInfoHelper(object):
     # pylint: disable=bad-continuation
     # we do not follow the python conventions for continuation indentation due to long lines here
 
-    def __init__(self, server, has_build_history = False):
+    def __init__(self, server, has_build_history = False, brbe = None):
         self.internal_state = {}
         self.internal_state['taskdata'] = {}
         self.internal_state['targets'] = []
@@ -865,7 +865,7 @@ class BuildInfoHelper(object):
 
         # this is set for Toaster-triggered builds by localhostbecontroller
         # via toasterui
-        self.brbe = None
+        self.brbe = brbe
 
         self.project = None
 
index 538a40964ce0ed5f5b5c282524d27f173eef7ff4..06a5f17f4eda56f69ba66a09ce5ccfe576efe489 100644 (file)
@@ -195,7 +195,8 @@ def main(server, eventHandler, params):
     taskfailures = []
     first = True
 
-    buildinfohelper = BuildInfoHelper(server, build_history_enabled)
+    buildinfohelper = BuildInfoHelper(server, build_history_enabled,
+                                      os.getenv('TOASTER_BRBE'))
 
     # write our own log files into bitbake's log directory;
     # we're only interested in the path to the parent directory of