summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server/xmlrpc.py
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2013-11-25 15:21:26 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-02 17:33:14 +0000
commita67fde0ab1b225b547aa4c0792f78667e4e031d5 (patch)
tree4ed918a41a306f5c27b9491cb44a6433b37eede9 /bitbake/lib/bb/server/xmlrpc.py
parent6ff9c9e39de57964ad7f711a77243a7049e9cada (diff)
downloadpoky-a67fde0ab1b225b547aa4c0792f78667e4e031d5.tar.gz
bitbake: bitbake.lock: Add host:port to bitbake.lock for memres server
The idea is to build on the --status-only option for bitbake and expose a mechanism where the oe init scripts can easily switch between memres server and the non-memres server. In the case of the standard oe init script the following can shut down the server: if [ -z "$BBSERVER" ] && [ -f bitbake.lock ] ; then grep ":" bitbake.lock > /dev/null && BBSERVER=`cat bitbake.lock` bitbake --status-only if [ $? = 0 ] ; then echo "Shutting down bitbake memory resident server with bitbake -m" BBSERVER=`cat bitbake.lock` bitbake -m fi fi A similar function can be used to automatically detect if the server is already running for the oe memres init script. This new functionality allows for the memres init script to be started in a new shell and connect up to an alaready running server without seeing the error of trying to start the server multiple times. (Bitbake rev: b1803958de8d7c3c3279841e38604a08dc2316cc) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server/xmlrpc.py')
-rw-r--r--bitbake/lib/bb/server/xmlrpc.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/server/xmlrpc.py b/bitbake/lib/bb/server/xmlrpc.py
index 3a67ab0cf2..46d074a738 100644
--- a/bitbake/lib/bb/server/xmlrpc.py
+++ b/bitbake/lib/bb/server/xmlrpc.py
@@ -198,6 +198,11 @@ class XMLRPCServer(SimpleXMLRPCServer, BaseImplServer):
198 Constructor 198 Constructor
199 """ 199 """
200 BaseImplServer.__init__(self) 200 BaseImplServer.__init__(self)
201 if (interface[1] == 0): # anonymous port, not getting reused
202 self.single_use = True
203 # Use auto port configuration
204 if (interface[1] == -1):
205 interface = (interface[0], 0)
201 SimpleXMLRPCServer.__init__(self, interface, 206 SimpleXMLRPCServer.__init__(self, interface,
202 requestHandler=BitBakeXMLRPCRequestHandler, 207 requestHandler=BitBakeXMLRPCRequestHandler,
203 logRequests=False, allow_none=True) 208 logRequests=False, allow_none=True)
@@ -208,8 +213,6 @@ class XMLRPCServer(SimpleXMLRPCServer, BaseImplServer):
208 self.autoregister_all_functions(self.commands, "") 213 self.autoregister_all_functions(self.commands, "")
209 self.interface = interface 214 self.interface = interface
210 self.single_use = False 215 self.single_use = False
211 if (interface[1] == 0): # anonymous port, not getting reused
212 self.single_use = True
213 216
214 def addcooker(self, cooker): 217 def addcooker(self, cooker):
215 BaseImplServer.addcooker(self, cooker) 218 BaseImplServer.addcooker(self, cooker)