]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: Sync up with upstream cosmetic changes for bin/bitbake
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 7 Jun 2011 22:46:50 +0000 (23:46 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Jun 2011 10:36:30 +0000 (11:36 +0100)
Sync cosmetic differences between bitbake in poky and bitbake upstream
in preparation for resolving the real code differences in the server
handling.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/bin/bitbake

index 6d0528953c04fc55b00ccdbb1f318203d64a74da..acd086753fc9027cfef31da621c4efee906cf38d 100755 (executable)
@@ -42,10 +42,11 @@ from bb import server
 from bb.server import none
 #from bb.server import xmlrpc
 
-__version__ = "1.11.0"
+__version__ = "1.13.0"
 logger = logging.getLogger("BitBake")
 
 
+
 class BBConfiguration(object):
     """
     Manages build options and configurations for one run
@@ -172,9 +173,6 @@ Default BBFILES are the .bb files in the current directory.""")
 
     ui_main = get_ui(configuration)
 
-    loghandler = event.LogHandler()
-    logger.addHandler(loghandler)
-
     #server = bb.server.xmlrpc
     server = bb.server.none
 
@@ -185,6 +183,10 @@ Default BBFILES are the .bb files in the current directory.""")
     bb.utils.init_logger(bb.msg, configuration.verbose, configuration.debug,
                          configuration.debug_domains)
 
+    # Ensure logging messages get sent to the UI as events
+    handler = bb.event.LogHandler()
+    logger.addHandler(handler)
+
     # Clear away any spurious environment variables. But don't wipe the
     # environment totally. This is necessary to ensure the correct operation
     # of the UIs (e.g. for DISPLAY, etc.)
@@ -198,17 +200,11 @@ Default BBFILES are the .bb files in the current directory.""")
     server.BitBakeServerFork(cooker, cooker.server, serverinfo, cooker_logfile)
     del cooker
 
-    logger.removeHandler(loghandler)
+    logger.removeHandler(handler)
 
     # Setup a connection to the server (cooker)
     server_connection = server.BitBakeServerConnection(serverinfo)
 
-    # Launch the UI
-    if configuration.ui:
-        ui = configuration.ui
-    else:
-        ui = "knotty"
-
     try:
         return server.BitbakeUILauch().launch(serverinfo, ui_main, server_connection.connection, server_connection.events)
     finally:
@@ -222,3 +218,4 @@ if __name__ == "__main__":
         import traceback
         traceback.print_exc(5)
     sys.exit(ret)
+