summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server/process.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/server/process.py')
-rw-r--r--bitbake/lib/bb/server/process.py21
1 files changed, 8 insertions, 13 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index aa072020af..6db6a2326d 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -80,7 +80,7 @@ class ProcessServer(Process, BaseImplServer):
80 80
81 def __init__(self, command_channel, event_queue, featurelist): 81 def __init__(self, command_channel, event_queue, featurelist):
82 BaseImplServer.__init__(self) 82 BaseImplServer.__init__(self)
83 Process.__init__(self, args=(featurelist)) 83 Process.__init__(self)
84 self.command_channel = command_channel 84 self.command_channel = command_channel
85 self.event_queue = event_queue 85 self.event_queue = event_queue
86 self.event = EventAdapter(event_queue) 86 self.event = EventAdapter(event_queue)
@@ -96,13 +96,6 @@ class ProcessServer(Process, BaseImplServer):
96 self.event_queue.put(event) 96 self.event_queue.put(event)
97 self.event_handle.value = bb.event.register_UIHhandler(self) 97 self.event_handle.value = bb.event.register_UIHhandler(self)
98 98
99 # process any feature changes based on what UI requested
100 original_featureset = list(self.cooker.featureset)
101 while len(self.featurelist)> 0:
102 self.cooker.featureset.setFeature(self.featurelist.pop())
103 if (original_featureset != list(self.cooker.featureset)):
104 self.cooker.reset()
105
106 bb.cooker.server_main(self.cooker, self.main) 99 bb.cooker.server_main(self.cooker, self.main)
107 100
108 def main(self): 101 def main(self):
@@ -207,17 +200,19 @@ class BitBakeServer(BitBakeBaseServer):
207 # 200 #
208 self.ui_channel, self.server_channel = Pipe() 201 self.ui_channel, self.server_channel = Pipe()
209 self.event_queue = ProcessEventQueue(0) 202 self.event_queue = ProcessEventQueue(0)
210 manager = Manager() 203 self.serverImpl = ProcessServer(self.server_channel, self.event_queue, None)
211 self.featurelist = manager.list()
212 self.serverImpl = ProcessServer(self.server_channel, self.event_queue, self.featurelist)
213 204
214 def detach(self): 205 def detach(self):
215 self.serverImpl.start() 206 self.serverImpl.start()
216 return 207 return
217 208
218 def establishConnection(self, featureset): 209 def establishConnection(self, featureset):
219 for f in featureset: 210
220 self.featurelist.append(f)
221 self.connection = BitBakeProcessServerConnection(self.serverImpl, self.ui_channel, self.event_queue) 211 self.connection = BitBakeProcessServerConnection(self.serverImpl, self.ui_channel, self.event_queue)
212
213 _, error = self.connection.connection.runCommand(["setFeatures", featureset])
214 if error:
215 logger.error("Unable to set the cooker to the correct featureset: %s" % error)
216 raise BaseException(error)
222 signal.signal(signal.SIGTERM, lambda i, s: self.connection.terminate()) 217 signal.signal(signal.SIGTERM, lambda i, s: self.connection.terminate())
223 return self.connection 218 return self.connection