summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2013-11-25 15:21:27 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-02 11:26:14 +0000
commitd6abc07ff385357d312d8435b89e0a9c1f965433 (patch)
tree51b5f90824f42a63563a84f6d106630e4f93d690 /bin
parent46b26ef5c27bfa9c91680f494f02750305b8098c (diff)
downloadbitbake-contrib-d6abc07ff385357d312d8435b89e0a9c1f965433.tar.gz
bitbake-contrib-d6abc07ff385357d312d8435b89e0a9c1f965433.tar.bz2
bitbake-contrib-d6abc07ff385357d312d8435b89e0a9c1f965433.zip
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. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bitbake10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/bitbake b/bin/bitbake
index cca2b8d29b..a0a2baa4bc 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -302,6 +302,7 @@ def main():
# we start a stub server that is actually a XMLRPClient that connects to a real server
server = servermodule.BitBakeXMLRPCClient(configParams.observe_only)
server.saveConnectionDetails(configParams.remote_server)
+ server.saveConnectionConfigParams(configParams)
if not configParams.server_only:
# Collect the feature set for the UI
@@ -312,11 +313,20 @@ def main():
server_connection = server.establishConnection(featureset)
except:
sys.exit(1)
+ if not server_connection:
+ sys.exit(1)
server_connection.terminate()
sys.exit(0)
# Setup a connection to the server (cooker)
server_connection = server.establishConnection(featureset)
+ if not server_connection:
+ if configParams.kill_server:
+ bb.fatal("Server already killed")
+ configParams.bind = configParams.remote_server
+ start_server(servermodule, configParams, configuration)
+ bb.event.ui_queue = []
+ server_connection = server.establishConnection(featureset)
# Restore the environment in case the UI needs it
for k in cleanedvars: