summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-28 15:40:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-30 08:43:36 +0100
commitb2c39835bb61687220abbef72e4f69a272cf8afb (patch)
tree991e25807b5baee65a54386bfcfadcc6c09d69cb /bitbake/lib/bb/cooker.py
parentdd3a59d3546b900dae92ab3b3eccca5a215ddf61 (diff)
downloadpoky-b2c39835bb61687220abbef72e4f69a272cf8afb.tar.gz
bitbake: process/cooker: Allow UI process to know if the cooker was started successfully
Currently if the server fails to start, the user sees no error message and the server will be repeatedly attempted to be started until some longer timeouts expire. There are error messages in the cookerdeamon log but nobody thinks to look there. Add in a pipe which can be used to tell the starting process whether the cooker did actually start or not. If it fails to start, no further attempts can be made and if present, the log file can be shown to the user. [YOCTO #11834] (Bitbake rev: 57000d44beb1aeba37dfc70782b0d6418943acc5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index d6e6919506..1a5e0038b6 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): 168 def __init__(self, configuration, featureSet=None, readypipe=None):
169 self.recipecaches = None 169 self.recipecaches = None
170 self.skiplist = {} 170 self.skiplist = {}
171 self.featureset = CookerFeatures() 171 self.featureset = CookerFeatures()
@@ -237,6 +237,10 @@ class BBCooker:
237 # Let SIGHUP exit as SIGTERM 237 # Let SIGHUP exit as SIGTERM
238 signal.signal(signal.SIGHUP, self.sigterm_exception) 238 signal.signal(signal.SIGHUP, self.sigterm_exception)
239 239
240 if readypipe:
241 os.write(readypipe, b"ready")
242 os.close(readypipe)
243
240 def config_notifications(self, event): 244 def config_notifications(self, event):
241 if event.maskname == "IN_Q_OVERFLOW": 245 if event.maskname == "IN_Q_OVERFLOW":
242 bb.warn("inotify event queue overflowed, invalidating caches.") 246 bb.warn("inotify event queue overflowed, invalidating caches.")