bitbake: 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 rev: 9841651e050a3e9f395ab3c62545c51197734584)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2016-07-07 14:27:43 +01:00
parent 1b5688e0f0
commit b301251668
1 changed files with 3 additions and 0 deletions

View 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):