]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: localhostbecontroller: Fix server search debug message
authorRandy Witt <randy.e.witt@linux.intel.com>
Mon, 18 May 2015 22:06:11 +0000 (15:06 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 19 May 2015 10:58:45 +0000 (11:58 +0100)
When the output from the commands ran was redirected to
"toaster_server.log" instead of the console, the debug message stating
the port on which bitbake is running would no longer appear.

This change makes looks at "toaster_server.log" for the port rather than
the _shellcmd output. This makes the debug message useful again.

(Bitbake rev: 9097bae469cb1e005092c11610d92e908b8f19f5)

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/toaster/bldcontrol/localhostbecontroller.py

index 1bd51437a6499e6a202cd9d2d2707ea73387b3c4..95ba481974b2d9fd5a96170243066f95d60da753 100644 (file)
@@ -122,10 +122,11 @@ class LocalhostBEController(BuildEnvironmentController):
         port = "-1"
         logger.debug("localhostbecontroller: starting builder \n%s\n" % cmd)
         cmdoutput = self._shellcmd(cmd)
-        for i in cmdoutput.split("\n"):
-            if i.startswith("Bitbake server address"):
-                port = i.split(" ")[-1]
-                logger.debug("localhostbecontroller: Found bitbake server port %s" % port)
+        with open(self.be.builddir + "/toaster_server.log", "r") as f:
+            for i in f.readlines():
+                if i.startswith("Bitbake server address"):
+                    port = i.split(" ")[-1]
+                    logger.debug("localhostbecontroller: Found bitbake server port %s" % port)
 
         def _toaster_ui_started(filepath, filepos = 0):
             if not os.path.exists(filepath):