summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2013-05-28 16:52:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-30 10:30:25 +0100
commit25b2af76104d5aaf6435de8c158e0407512f97ce (patch)
tree7e9d09c7b20de0c269d61e314a386c8e4a09a9d2 /bin
parenta00c2186bffe848a7cedf31969b904f8f7322ae6 (diff)
downloadbitbake-25b2af76104d5aaf6435de8c158e0407512f97ce.tar.gz
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 <bogdan.a.marinescu@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bitbake17
1 files changed, 15 insertions, 2 deletions
diff --git a/bin/bitbake b/bin/bitbake
index 6d4efe6bb..f3bbeb466 100755
--- a/bin/bitbake
+++ b/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)