summaryrefslogtreecommitdiffstats
path: root/lib/bb/server/process.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/server/process.py')
-rw-r--r--lib/bb/server/process.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index e45e0c2f6..aa072020a 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -31,7 +31,7 @@ import sys
import time
import select
from Queue import Empty
-from multiprocessing import Event, Process, util, Queue, Pipe, queues
+from multiprocessing import Event, Process, util, Queue, Pipe, queues, Manager
from . import BitBakeBaseServer, BitBakeBaseServerConnection, BaseImplServer
@@ -78,12 +78,13 @@ class ProcessServer(Process, BaseImplServer):
profile_filename = "profile.log"
profile_processed_filename = "profile.log.processed"
- def __init__(self, command_channel, event_queue):
+ def __init__(self, command_channel, event_queue, featurelist):
BaseImplServer.__init__(self)
- Process.__init__(self)
+ Process.__init__(self, args=(featurelist))
self.command_channel = command_channel
self.event_queue = event_queue
self.event = EventAdapter(event_queue)
+ self.featurelist = featurelist
self.quit = False
self.keep_running = Event()
@@ -94,6 +95,14 @@ class ProcessServer(Process, BaseImplServer):
for event in bb.event.ui_queue:
self.event_queue.put(event)
self.event_handle.value = bb.event.register_UIHhandler(self)
+
+ # process any feature changes based on what UI requested
+ original_featureset = list(self.cooker.featureset)
+ while len(self.featurelist)> 0:
+ self.cooker.featureset.setFeature(self.featurelist.pop())
+ if (original_featureset != list(self.cooker.featureset)):
+ self.cooker.reset()
+
bb.cooker.server_main(self.cooker, self.main)
def main(self):
@@ -198,13 +207,17 @@ class BitBakeServer(BitBakeBaseServer):
#
self.ui_channel, self.server_channel = Pipe()
self.event_queue = ProcessEventQueue(0)
- self.serverImpl = ProcessServer(self.server_channel, self.event_queue)
+ manager = Manager()
+ self.featurelist = manager.list()
+ self.serverImpl = ProcessServer(self.server_channel, self.event_queue, self.featurelist)
def detach(self):
self.serverImpl.start()
return
- def establishConnection(self):
+ def establishConnection(self, featureset):
+ for f in featureset:
+ self.featurelist.append(f)
self.connection = BitBakeProcessServerConnection(self.serverImpl, self.ui_channel, self.event_queue)
signal.signal(signal.SIGTERM, lambda i, s: self.connection.terminate())
return self.connection