diff options
| -rwxr-xr-x | bitbake/bin/bitbake | 19 |
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 | |||
| 42 | from bb.server import none | 42 | from 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" |
| 46 | logger = logging.getLogger("BitBake") | 46 | logger = logging.getLogger("BitBake") |
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | |||
| 49 | class BBConfiguration(object): | 50 | class 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 | |||
