mirror of
https://git.yoctoproject.org/poky
synced 2026-05-07 16:59:22 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
993bc7eacd
commit
fcbba5a89b
@@ -291,12 +291,19 @@ class LocalhostBEController(BuildEnvironmentController):
|
||||
def triggerBuild(self, bitbake, layers, variables, targets):
|
||||
# set up the buid environment with the needed layers
|
||||
self.setLayers(bitbake, layers, targets)
|
||||
self.writeConfFile("conf/toaster-pre.conf", variables)
|
||||
self.writeConfFile("conf/toaster.conf", raw = "INHERIT+=\"toaster buildhistory\"")
|
||||
|
||||
# get the bb server running with the build req id and build env id
|
||||
bbctrl = self.getBBController()
|
||||
|
||||
# set variables
|
||||
for var in variables:
|
||||
bbctrl.setVariable(var.name, var.value)
|
||||
|
||||
# Add 'toaster' and 'buildhistory' to INHERIT variable
|
||||
inherit = {item.strip() for item in bbctrl.getVariable('INHERIT').split()}
|
||||
inherit = inherit.union(["toaster", "buildhistory"])
|
||||
bbctrl.setVariable('INHERIT', ' '.join(inherit))
|
||||
|
||||
# trigger the build command
|
||||
task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, targets))
|
||||
if len(task) == 0:
|
||||
|
||||
Reference in New Issue
Block a user