aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/server
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-28 17:06:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-30 09:51:37 +0100
commitc3b5cc5691291c74dd315c4439c80e0e4b2b5c1d (patch)
treeb5957c1e407bc9a05763b166922823c7bf089aa3 /lib/bb/server
parentdb4d80b5c2d32117cdf06333b9627202998b1512 (diff)
downloadbitbake-c3b5cc5691291c74dd315c4439c80e0e4b2b5c1d.tar.gz
server/xmlrpc: Simlify featureset handling
Rather than passing featureset around various places where the data doesn't really belong, run a command at connection time to set the appropriate features. This is similar to what the process server does. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/server')
-rw-r--r--lib/bb/server/xmlrpc.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/bb/server/xmlrpc.py b/lib/bb/server/xmlrpc.py
index 46d074a73..bf867b584 100644
--- a/lib/bb/server/xmlrpc.py
+++ b/lib/bb/server/xmlrpc.py
@@ -89,7 +89,7 @@ class BitBakeServerCommands():
self.server = server
self.has_client = False
- def registerEventHandler(self, host, port, featureset = []):
+ def registerEventHandler(self, host, port):
"""
Register a remote UI Event Handler
"""
@@ -99,13 +99,6 @@ class BitBakeServerCommands():
if (self.cooker.state in [bb.cooker.state.parsing, bb.cooker.state.running]):
return None
- original_featureset = list(self.cooker.featureset)
- for f in featureset:
- self.cooker.featureset.setFeature(f)
-
- if (original_featureset != list(self.cooker.featureset)):
- self.cooker.reset()
-
self.event_handle = bb.event.register_UIHhandler(s)
return self.event_handle
@@ -293,9 +286,15 @@ class BitBakeXMLRPCServerConnection(BitBakeBaseServerConnection):
return None
self.transport.set_connection_token(token)
- self.events = uievent.BBUIEventQueue(self.connection, self.clientinfo, self.featureset)
+ self.events = uievent.BBUIEventQueue(self.connection, self.clientinfo)
for event in bb.event.ui_queue:
self.events.queue_event(event)
+
+ _, error = self.connection.runCommand(["setFeatures", self.featureset])
+ if error:
+ logger.error("Unable to set the cooker to the correct featureset: %s" % error)
+ raise BaseException(error)
+
return self
def removeClient(self):