diff options
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 6 | ||||
| -rw-r--r-- | bitbake/lib/bb/server/process.py | 17 |
2 files changed, 14 insertions, 9 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 7d040dcd88..8fe36eba1e 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
| @@ -165,7 +165,7 @@ class BBCooker: | |||
| 165 | Manages one bitbake build run | 165 | Manages one bitbake build run |
| 166 | """ | 166 | """ |
| 167 | 167 | ||
| 168 | def __init__(self, configuration, featureSet=None, readypipe=None): | 168 | def __init__(self, configuration, featureSet=None): |
| 169 | self.recipecaches = None | 169 | self.recipecaches = None |
| 170 | self.skiplist = {} | 170 | self.skiplist = {} |
| 171 | self.featureset = CookerFeatures() | 171 | self.featureset = CookerFeatures() |
| @@ -233,10 +233,6 @@ class BBCooker: | |||
| 233 | # Let SIGHUP exit as SIGTERM | 233 | # Let SIGHUP exit as SIGTERM |
| 234 | signal.signal(signal.SIGHUP, self.sigterm_exception) | 234 | signal.signal(signal.SIGHUP, self.sigterm_exception) |
| 235 | 235 | ||
| 236 | if readypipe: | ||
| 237 | os.write(readypipe, b"ready") | ||
| 238 | os.close(readypipe) | ||
| 239 | |||
| 240 | def process_inotify_updates(self): | 236 | def process_inotify_updates(self): |
| 241 | for n in [self.confignotifier, self.notifier]: | 237 | for n in [self.confignotifier, self.notifier]: |
| 242 | if n.check_events(timeout=0): | 238 | if n.check_events(timeout=0): |
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 5c7dfaefa1..6a12f01057 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py | |||
| @@ -388,8 +388,10 @@ class BitBakeServer(object): | |||
| 388 | self.bitbake_lock.close() | 388 | self.bitbake_lock.close() |
| 389 | 389 | ||
| 390 | ready = ConnectionReader(self.readypipe) | 390 | ready = ConnectionReader(self.readypipe) |
| 391 | r = ready.wait(30) | 391 | r = ready.poll(30) |
| 392 | if not r: | 392 | if r: |
| 393 | r = ready.get() | ||
| 394 | if not r or r != "ready": | ||
| 393 | ready.close() | 395 | ready.close() |
| 394 | bb.error("Unable to start bitbake server") | 396 | bb.error("Unable to start bitbake server") |
| 395 | if os.path.exists(logfile): | 397 | if os.path.exists(logfile): |
| @@ -404,8 +406,15 @@ class BitBakeServer(object): | |||
| 404 | print("Starting bitbake server pid %d" % os.getpid()) | 406 | print("Starting bitbake server pid %d" % os.getpid()) |
| 405 | server = ProcessServer(self.bitbake_lock, self.sock, self.sockname) | 407 | server = ProcessServer(self.bitbake_lock, self.sock, self.sockname) |
| 406 | self.configuration.setServerRegIdleCallback(server.register_idle_function) | 408 | self.configuration.setServerRegIdleCallback(server.register_idle_function) |
| 407 | 409 | writer = ConnectionWriter(self.readypipein) | |
| 408 | self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset, self.readypipein) | 410 | try: |
| 411 | self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset) | ||
| 412 | writer.send("ready") | ||
| 413 | except: | ||
| 414 | writer.send("fail") | ||
| 415 | raise | ||
| 416 | finally: | ||
| 417 | os.close(self.readypipein) | ||
| 409 | server.cooker = self.cooker | 418 | server.cooker = self.cooker |
| 410 | server.server_timeout = self.configuration.server_timeout | 419 | server.server_timeout = self.configuration.server_timeout |
| 411 | server.xmlrpcinterface = self.configuration.xmlrpcinterface | 420 | server.xmlrpcinterface = self.configuration.xmlrpcinterface |
