Skip to contentSkip to conversation

progress: Ensure missing start event is fired

PATCH New Richard Purdie 1 participant 1 message Jul 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 progress: Ensure missing start event is fired

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.

bitbake/lib/bb/progress.py +3 -0
index 4941776..ee6b953 100644
@@ -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):