From 0ca70ce37aa8cec6a74ec874a7b11597b608c403 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Mon, 3 Nov 2014 13:47:16 +0000 Subject: bitbake: toaster script: webport option and other improvements We add the "webport=" command line option as to allow starting the web server on a custom port. The bitbake server port is now auto-allocated. This is needed to be able to run multiple toaster environments on a single machine. We tackle bug 6023 (toaster refusing to start when lock file is present) by using more specific checks, and automatically recover from bitbake server down / webserver up error mode. Command line parameters are now read on both interactive and managed modes. The localhost and ssh controllers are updated to work with the modified toaster launcher script. [YOCTO #6023] (Bitbake rev: cd3eb5b051743463cfe51dba97cae4da75420048) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/bldcontrol/bbcontroller.py | 19 +++++++++++++++++++ 1 file changed, 19 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 6bb45d6388..7c27fe110e 100644 --- a/bitbake/lib/toaster/bldcontrol/bbcontroller.py +++ b/bitbake/lib/toaster/bldcontrol/bbcontroller.py @@ -117,6 +117,25 @@ class BuildEnvironmentController(object): self.be = be self.connection = None + @staticmethod + def _updateBBLayers(bblayerconf, layerlist): + conflines = open(bblayerconf, "r").readlines() + + bblayerconffile = open(bblayerconf, "w") + skip = 0 + for i in xrange(len(conflines)): + if skip > 0: + skip =- 1 + continue + if conflines[i].startswith("# line added by toaster"): + skip = 1 + else: + bblayerconffile.write(conflines[i]) + + bblayerconffile.write("# line added by toaster build control\nBBLAYERS = \"" + " ".join(layerlist) + "\"") + bblayerconffile.close() + + def startBBServer(self, brbe): """ Starts a BB server with Toaster toasterui set up to record the builds, an no controlling UI. -- cgit v1.2.3-54-g00ecf