From 3c3766927212853dfd195185caaa0fc951f049c8 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Thu, 8 Jan 2015 13:15:11 +0000 Subject: bitbake: toaster: write pre-read conf file for build variables We change the setting of variables from directly injection into the set-up cooker to writing a conf file that is pre-read on bitbake server startup. This is needed because the injection can only happen after the variable set is parsed, and the variables already inferred, so setting up variables happens too late. [YOCTO #7045] (Bitbake rev: 854f680b5b9d2d0fa796af84cb1218545fbfc55a) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/bldcontrol/bbcontroller.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bitbake/lib/toaster/bldcontrol/bbcontroller.py') diff --git a/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/bitbake/lib/toaster/bldcontrol/bbcontroller.py index 7c27fe110e..102606e929 100644 --- a/bitbake/lib/toaster/bldcontrol/bbcontroller.py +++ b/bitbake/lib/toaster/bldcontrol/bbcontroller.py @@ -135,6 +135,11 @@ class BuildEnvironmentController(object): bblayerconffile.write("# line added by toaster build control\nBBLAYERS = \"" + " ".join(layerlist) + "\"") bblayerconffile.close() + def writePreConfFile(self, variable_list): + prefilepath = os.path.join(self.be.builddir, "conf/toaster-pre.conf") + with open(prefilepath, "w") as prefile: + for i in variable_list: + prefile.write("%s=\"%s\"\n" % (i.name, i.value)) def startBBServer(self, brbe): -- cgit v1.2.3-54-g00ecf