summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-12-02 10:02:54 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-07 17:37:10 +0000
commitfcbba5a89b2ebe3a6688b976f6e0600970d9cc4b (patch)
treeb97b0c418852e2c9663725d7416cd42f6c738468
parent993bc7eacd25a3f20825a892b1ebd92ed806bbda (diff)
downloadpoky-fcbba5a89b2ebe3a6688b976f6e0600970d9cc4b.tar.gz
bitbake: toaster: set varibales on bitbake server
Set project variables using connection to bitbake server instead of writing them to toaster configuration files. This is a way to avoid rewriting configuration files before and after every build, triggered by toaster UI. (Bitbake rev: 3f77c69b867735b5d27c6ab7c62e39ac8d5cb2b5) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/toaster/bldcontrol/localhostbecontroller.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index 19afb1ada5..efba73e769 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -291,12 +291,19 @@ class LocalhostBEController(BuildEnvironmentController):
291 def triggerBuild(self, bitbake, layers, variables, targets): 291 def triggerBuild(self, bitbake, layers, variables, targets):
292 # set up the buid environment with the needed layers 292 # set up the buid environment with the needed layers
293 self.setLayers(bitbake, layers, targets) 293 self.setLayers(bitbake, layers, targets)
294 self.writeConfFile("conf/toaster-pre.conf", variables)
295 self.writeConfFile("conf/toaster.conf", raw = "INHERIT+=\"toaster buildhistory\"")
296 294
297 # get the bb server running with the build req id and build env id 295 # get the bb server running with the build req id and build env id
298 bbctrl = self.getBBController() 296 bbctrl = self.getBBController()
299 297
298 # set variables
299 for var in variables:
300 bbctrl.setVariable(var.name, var.value)
301
302 # Add 'toaster' and 'buildhistory' to INHERIT variable
303 inherit = {item.strip() for item in bbctrl.getVariable('INHERIT').split()}
304 inherit = inherit.union(["toaster", "buildhistory"])
305 bbctrl.setVariable('INHERIT', ' '.join(inherit))
306
300 # trigger the build command 307 # trigger the build command
301 task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, targets)) 308 task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, targets))
302 if len(task) == 0: 309 if len(task) == 0: