summaryrefslogtreecommitdiffstats
path: root/bitbake/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:44:00 +0100
commitd0861b7a12113c6626c6206faf3a9389fb8ef5cb (patch)
tree7b7c9a012c28c71e3ae711e56a611d2084c22d14 /bitbake/bin
parent0fc3a1eddfbab5cbf61c028cf8bc0d6b27b6c420 (diff)
downloadpoky-d0861b7a12113c6626c6206faf3a9389fb8ef5cb.tar.gz
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 <bogdan.a.marinescu@intel.com> (Bitbake rev: 25b2af76104d5aaf6435de8c158e0407512f97ce) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake17
1 files changed, 15 insertions, 2 deletions
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):
190 190
191 parser.add_option("-B", "--bind", help = "The name/address for the bitbake server to bind to", 191 parser.add_option("-B", "--bind", help = "The name/address for the bitbake server to bind to",
192 action = "store", dest = "bind", default = False) 192 action = "store", dest = "bind", default = False)
193
193 parser.add_option("", "--no-setscene", help = "Do not run any setscene tasks, forces builds", 194 parser.add_option("", "--no-setscene", help = "Do not run any setscene tasks, forces builds",
194 action = "store_true", dest = "nosetscene", default = False) 195 action = "store_true", dest = "nosetscene", default = False)
196
197 parser.add_option("", "--remote-server", help = "Connect to the specified server",
198 action = "store", dest = "remote_server", default = False)
199
195 options, targets = parser.parse_args(sys.argv) 200 options, targets = parser.parse_args(sys.argv)
196 return options, targets[1:] 201 return options, targets[1:]
197 202
@@ -260,6 +265,9 @@ def main():
260 if configParams.bind and configParams.servertype != "xmlrpc": 265 if configParams.bind and configParams.servertype != "xmlrpc":
261 sys.exit("FATAL: If '-B' or '--bind' is defined, we must set the servertype as 'xmlrpc'.\n") 266 sys.exit("FATAL: If '-B' or '--bind' is defined, we must set the servertype as 'xmlrpc'.\n")
262 267
268 if configParams.remote_server and configParams.servertype != "xmlrpc":
269 sys.exit("FATAL: If '--remote-server' is defined, we must set the servertype as 'xmlrpc'.\n")
270
263 if "BBDEBUG" in os.environ: 271 if "BBDEBUG" in os.environ:
264 level = int(os.environ["BBDEBUG"]) 272 level = int(os.environ["BBDEBUG"])
265 if level > configuration.debug: 273 if level > configuration.debug:
@@ -281,8 +289,13 @@ def main():
281 else: 289 else:
282 configuration.extra_caches = getattr(ui_module, "extraCaches", []) 290 configuration.extra_caches = getattr(ui_module, "extraCaches", [])
283 291
284 # we start a server with a given configuration 292 if not configParams.remote_server:
285 server = start_server(servermodule, configParams, configuration) 293 # we start a server with a given configuration
294 server = start_server(servermodule, configParams, configuration)
295 else:
296 # we start a stub server that is actually a XMLRPClient to
297 server = servermodule.BitBakeXMLRPCClient()
298 server.saveConnectionDetails(configParams.remote_server)
286 299
287 logger.removeHandler(handler) 300 logger.removeHandler(handler)
288 301