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. Signed-off-by: Ed Bartosh <[email protected]> --- bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index 9ab741f..b16a1a7 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py @@ -292,12 +292,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: -- 2.1.4 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
