]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
progress: Ensure missing start event is fired
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 7 Jul 2016 13:27:43 +0000 (14:27 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 8 Jul 2016 08:57:06 +0000 (09:57 +0100)
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>
lib/bb/progress.py

index 49417761bbde0e7c0d4771a8042eced02016bd2f..ee6b9536b80c2899a4508eb19e3a753a94568fb5 100644 (file)
@@ -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):