summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-07 23:46:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-08 11:36:30 +0100
commite386fe4542865119ae7e1574e260c037e926239e (patch)
treec8c163b23f54378f6a3cd5f175dfaefac63ac38b /bitbake
parent5af197b55a4b779f1ec93186f0723026949ba2b5 (diff)
downloadpoky-e386fe4542865119ae7e1574e260c037e926239e.tar.gz
bitbake: Sync up with upstream cosmetic changes for bin/bitbake
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>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/bin/bitbake19
1 files changed, 8 insertions, 11 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 6d0528953c..acd086753f 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -42,10 +42,11 @@ from bb import server
42from bb.server import none 42from bb.server import none
43#from bb.server import xmlrpc 43#from bb.server import xmlrpc
44 44
45__version__ = "1.11.0" 45__version__ = "1.13.0"
46logger = logging.getLogger("BitBake") 46logger = logging.getLogger("BitBake")
47 47
48 48
49
49class BBConfiguration(object): 50class BBConfiguration(object):
50 """ 51 """
51 Manages build options and configurations for one run 52 Manages build options and configurations for one run
@@ -172,9 +173,6 @@ Default BBFILES are the .bb files in the current directory.""")
172 173
173 ui_main = get_ui(configuration) 174 ui_main = get_ui(configuration)
174 175
175 loghandler = event.LogHandler()
176 logger.addHandler(loghandler)
177
178 #server = bb.server.xmlrpc 176 #server = bb.server.xmlrpc
179 server = bb.server.none 177 server = bb.server.none
180 178
@@ -185,6 +183,10 @@ Default BBFILES are the .bb files in the current directory.""")
185 bb.utils.init_logger(bb.msg, configuration.verbose, configuration.debug, 183 bb.utils.init_logger(bb.msg, configuration.verbose, configuration.debug,
186 configuration.debug_domains) 184 configuration.debug_domains)
187 185
186 # Ensure logging messages get sent to the UI as events
187 handler = bb.event.LogHandler()
188 logger.addHandler(handler)
189
188 # Clear away any spurious environment variables. But don't wipe the 190 # Clear away any spurious environment variables. But don't wipe the
189 # environment totally. This is necessary to ensure the correct operation 191 # environment totally. This is necessary to ensure the correct operation
190 # of the UIs (e.g. for DISPLAY, etc.) 192 # of the UIs (e.g. for DISPLAY, etc.)
@@ -198,17 +200,11 @@ Default BBFILES are the .bb files in the current directory.""")
198 server.BitBakeServerFork(cooker, cooker.server, serverinfo, cooker_logfile) 200 server.BitBakeServerFork(cooker, cooker.server, serverinfo, cooker_logfile)
199 del cooker 201 del cooker
200 202
201 logger.removeHandler(loghandler) 203 logger.removeHandler(handler)
202 204
203 # Setup a connection to the server (cooker) 205 # Setup a connection to the server (cooker)
204 server_connection = server.BitBakeServerConnection(serverinfo) 206 server_connection = server.BitBakeServerConnection(serverinfo)
205 207
206 # Launch the UI
207 if configuration.ui:
208 ui = configuration.ui
209 else:
210 ui = "knotty"
211
212 try: 208 try:
213 return server.BitbakeUILauch().launch(serverinfo, ui_main, server_connection.connection, server_connection.events) 209 return server.BitbakeUILauch().launch(serverinfo, ui_main, server_connection.connection, server_connection.events)
214 finally: 210 finally:
@@ -222,3 +218,4 @@ if __name__ == "__main__":
222 import traceback 218 import traceback
223 traceback.print_exc(5) 219 traceback.print_exc(5)
224 sys.exit(ret) 220 sys.exit(ret)
221