All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] progress: Ensure missing start event is fired
@ 2016-07-07 13:27 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2016-07-07 13:27 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Eggleton, Paul

The init function of the parent class fires a progress event for 0
progress rather than a start event. UI code was assuming that progress
events should always have a start event first. This change ensures that
the start event is correctly generated.

This fixes crashes that were seen in knotty in some configurations.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/bitbake/lib/bb/progress.py b/bitbake/lib/bb/progress.py
index 4941776..ee6b953 100644
--- a/bitbake/lib/bb/progress.py
+++ b/bitbake/lib/bb/progress.py
@@ -209,6 +209,9 @@ class MultiStageProcessProgressReporter(MultiStageProgressReporter):
         bb.event.fire(bb.event.ProcessStarted(self._processname, 100), self._data)
 
     def _fire_progress(self, taskprogress):
+        if taskprogress == 0:
+            self.start()
+            return
         bb.event.fire(bb.event.ProcessProgress(self._processname, taskprogress), self._data)
 
     def finish(self):





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-07 13:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07 13:27 [PATCH] progress: Ensure missing start event is fired Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.