[oe-commits] [bitbake] 02/13: progress: Ensure missing start event is fired

git at git.openembedded.org git at git.openembedded.org
Thu Jul 7 13:30:27 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 5731c5255658447e93dea50dfde5d62e37af680a
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu Jul 7 14:27:43 2016 +0100

    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.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/progress.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/bb/progress.py b/lib/bb/progress.py
index 4941776..ee6b953 100644
--- a/lib/bb/progress.py
+++ b/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):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list