1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 00:39:46 +00:00

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>
This commit is contained in:
Alexandru DAMIAN
2013-05-28 16:52:02 +00:00
committed by Richard Purdie
parent 0fc3a1eddf
commit d0861b7a12
2 changed files with 215 additions and 8 deletions
+15 -2
View File
@@ -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)