diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2013-11-25 15:21:27 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-12-02 11:28:27 +0000 |
commit | 6ff9c9e39de57964ad7f711a77243a7049e9cada (patch) | |
tree | fce7119ba7d8e48a7ab1dfafd16b18244ddb6a80 /bitbake/bin | |
parent | 0bea372b0fe6d77b2f6b742214f97a0db79e3990 (diff) | |
download | poky-6ff9c9e39de57964ad7f711a77243a7049e9cada.tar.gz |
bitbake: bitbake, xmlrpc.py: Implement memory resident auto port configuration/restart
This patch adds the ability to dynamically select a port for the
bitbake memory resident server when the BBSERVER port is set to -1.
This allows for running multiple instances of the bitbake memory
resident server on the same system in different build directories.
The client portion of the bitbake instance can also request that the
server automatically start when using the auto port feature. This is
to deal with a bitbake instance that eventually times out and exits or
that has died for some unknown reason.
The new functionality allows for lazy startup of the server after
sourcing the init script for the memory resident functionality.
(Bitbake rev: d6abc07ff385357d312d8435b89e0a9c1f965433)
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-x | bitbake/bin/bitbake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index cca2b8d29b..a0a2baa4bc 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/bin/bitbake | |||
@@ -302,6 +302,7 @@ def main(): | |||
302 | # we start a stub server that is actually a XMLRPClient that connects to a real server | 302 | # we start a stub server that is actually a XMLRPClient that connects to a real server |
303 | server = servermodule.BitBakeXMLRPCClient(configParams.observe_only) | 303 | server = servermodule.BitBakeXMLRPCClient(configParams.observe_only) |
304 | server.saveConnectionDetails(configParams.remote_server) | 304 | server.saveConnectionDetails(configParams.remote_server) |
305 | server.saveConnectionConfigParams(configParams) | ||
305 | 306 | ||
306 | if not configParams.server_only: | 307 | if not configParams.server_only: |
307 | # Collect the feature set for the UI | 308 | # Collect the feature set for the UI |
@@ -312,11 +313,20 @@ def main(): | |||
312 | server_connection = server.establishConnection(featureset) | 313 | server_connection = server.establishConnection(featureset) |
313 | except: | 314 | except: |
314 | sys.exit(1) | 315 | sys.exit(1) |
316 | if not server_connection: | ||
317 | sys.exit(1) | ||
315 | server_connection.terminate() | 318 | server_connection.terminate() |
316 | sys.exit(0) | 319 | sys.exit(0) |
317 | 320 | ||
318 | # Setup a connection to the server (cooker) | 321 | # Setup a connection to the server (cooker) |
319 | server_connection = server.establishConnection(featureset) | 322 | server_connection = server.establishConnection(featureset) |
323 | if not server_connection: | ||
324 | if configParams.kill_server: | ||
325 | bb.fatal("Server already killed") | ||
326 | configParams.bind = configParams.remote_server | ||
327 | start_server(servermodule, configParams, configuration) | ||
328 | bb.event.ui_queue = [] | ||
329 | server_connection = server.establishConnection(featureset) | ||
320 | 330 | ||
321 | # Restore the environment in case the UI needs it | 331 | # Restore the environment in case the UI needs it |
322 | for k in cleanedvars: | 332 | for k in cleanedvars: |