From d0861b7a12113c6626c6206faf3a9389fb8ef5cb Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Tue, 28 May 2013 16:52:02 +0000 Subject: bitbake: bitbake: xmlrpc remote server Added code in XMLRPC server that creates a stub local server for a client-only connection and is able to connect to a remote server, and receive events from the remote server. Added the option to start a client with a remote server in bitbake. Original code by Bogdan Marinescu (Bitbake rev: 25b2af76104d5aaf6435de8c158e0407512f97ce) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/bin/bitbake | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'bitbake/bin/bitbake') diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index 6d4efe6bbf..f3bbeb4667 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/bin/bitbake @@ -190,8 +190,13 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters): parser.add_option("-B", "--bind", help = "The name/address for the bitbake server to bind to", action = "store", dest = "bind", default = False) + parser.add_option("", "--no-setscene", help = "Do not run any setscene tasks, forces builds", action = "store_true", dest = "nosetscene", default = False) + + parser.add_option("", "--remote-server", help = "Connect to the specified server", + action = "store", dest = "remote_server", default = False) + options, targets = parser.parse_args(sys.argv) return options, targets[1:] @@ -260,6 +265,9 @@ def main(): if configParams.bind and configParams.servertype != "xmlrpc": sys.exit("FATAL: If '-B' or '--bind' is defined, we must set the servertype as 'xmlrpc'.\n") + if configParams.remote_server and configParams.servertype != "xmlrpc": + sys.exit("FATAL: If '--remote-server' is defined, we must set the servertype as 'xmlrpc'.\n") + if "BBDEBUG" in os.environ: level = int(os.environ["BBDEBUG"]) if level > configuration.debug: @@ -281,8 +289,13 @@ def main(): else: configuration.extra_caches = getattr(ui_module, "extraCaches", []) - # we start a server with a given configuration - server = start_server(servermodule, configParams, configuration) + if not configParams.remote_server: + # we start a server with a given configuration + server = start_server(servermodule, configParams, configuration) + else: + # we start a stub server that is actually a XMLRPClient to + server = servermodule.BitBakeXMLRPCClient() + server.saveConnectionDetails(configParams.remote_server) logger.removeHandler(handler) -- cgit v1.2.3-54-g00ecf