From b2c39835bb61687220abbef72e4f69a272cf8afb Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 28 Jul 2017 15:40:02 +0100 Subject: 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 --- bitbake/lib/bb/cooker.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/cooker.py') 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: Manages one bitbake build run """ - def __init__(self, configuration, featureSet=None): + def __init__(self, configuration, featureSet=None, readypipe=None): self.recipecaches = None self.skiplist = {} self.featureset = CookerFeatures() @@ -237,6 +237,10 @@ class BBCooker: # Let SIGHUP exit as SIGTERM signal.signal(signal.SIGHUP, self.sigterm_exception) + if readypipe: + os.write(readypipe, b"ready") + os.close(readypipe) + def config_notifications(self, event): if event.maskname == "IN_Q_OVERFLOW": bb.warn("inotify event queue overflowed, invalidating caches.") -- cgit v1.2.3-54-g00ecf