From b58e5b1fb3bcacbcfce17a748bca5f60c3528b4f Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Thu, 17 Mar 2016 11:34:23 +0000 Subject: bitbake: bitbake: xmlrpc: set single use mode differently Currently xmlrpc server implicitly sets itself into single use mode when bitbake server is started with anonymous port (0) or no port is provided in command line. In this mode bitbake shuts down xmlrpc server after build is done. This assumption is incorrect in some cases. For example Toaster uses bitbake in this mode and expects xmlrpc server to stay in memory. Till recent changes single use mode was always unset due to the bug. When the bug was fixed it broke toaster builds as Toaster couldn't communicate with bitbake server in single use mode. Reimplemented logic of setting single use mode. The mode is explicity set when --server-only command line parameter is not provided to bitbake. It doesn't depend on the port number anymore. [YOCTO #9275] [YOCTO #9240] [YOCTO #9252] (Bitbake rev: afc0dd5c532684f6201b1e12bbf4c226ea19062d) Signed-off-by: Ed Bartosh Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- bitbake/lib/bb/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/main.py') diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py index bf59793db5..a28c7514df 100755 --- a/bitbake/lib/bb/main.py +++ b/bitbake/lib/bb/main.py @@ -282,12 +282,13 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters): def start_server(servermodule, configParams, configuration, features): server = servermodule.BitBakeServer() + single_use = not configParams.server_only if configParams.bind: (host, port) = configParams.bind.split(':') - server.initServer((host, int(port))) + server.initServer((host, int(port)), single_use) configuration.interface = [ server.serverImpl.host, server.serverImpl.port ] else: - server.initServer() + server.initServer(single_use=single_use) configuration.interface = [] try: -- cgit v1.2.3-54-g00ecf