aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-07 14:26:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-08 09:57:27 +0100
commit1b5688e0f0331ab9196cc534dabcade831a9090c (patch)
treec05c410838027212eb17cff2428429bf5b145d55 /bitbake
parent1b930b41a5e677eea0adae3d247f43b77d1945f6 (diff)
downloadopenembedded-core-contrib-1b5688e0f0331ab9196cc534dabcade831a9090c.tar.gz
bitbake: knotty: Handle process indicators more gracefully
Mistakes can happen with the generation of the progress events, change knotty to be more tolerant of this rather than crashing, reporting to the user when something unexpected happens. I haven't debugged why multiple finish events appear to be triggered. (Bitbake rev: 7dd06b1016b36420a9c55a45ff29dd64ae1dbcda) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/knotty.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index dbcb9c417b..e8e169fe67 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -496,13 +496,16 @@ def main(server, eventHandler, params, tf = TerminalFilter):
parseprogress = new_progress("Parsing recipes", event.total).start()
continue
if isinstance(event, bb.event.ParseProgress):
- parseprogress.update(event.current)
+ if parseprogress:
+ parseprogress.update(event.current)
+ else:
+ bb.warn("Got ParseProgress event for parsing that never started?")
continue
if isinstance(event, bb.event.ParseCompleted):
if not parseprogress:
continue
-
parseprogress.finish()
+ pasreprogress = None
if not params.options.quiet:
print(("Parsing of %d .bb files complete (%d cached, %d parsed). %d targets, %d skipped, %d masked, %d errors."
% ( event.total, event.cached, event.parsed, event.virtuals, event.skipped, event.masked, event.errors)))
@@ -606,10 +609,15 @@ def main(server, eventHandler, params, tf = TerminalFilter):
parseprogress.start(False)
continue
if isinstance(event, bb.event.ProcessProgress):
- parseprogress.update(event.progress)
+ if parseprogress:
+ parseprogress.update(event.progress)
+ else:
+ bb.warn("Got ProcessProgress event for someting that never started?")
continue
if isinstance(event, bb.event.ProcessFinished):
- parseprogress.finish()
+ if parseprogress:
+ parseprogress.finish()
+ parseprogress = None
continue
# ignore