1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

bitbake: 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.

(Bitbake rev: c3b5cc5691291c74dd315c4439c80e0e4b2b5c1d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2014-03-28 17:06:43 +00:00
parent adba3edca2
commit fc49a6f00f
2 changed files with 10 additions and 11 deletions
+8 -9
View File
@@ -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):