]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: lib/bb/progress: avoid possibility of start event being reported twice
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Fri, 22 Jul 2016 12:18:39 +0000 (00:18 +1200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 26 Jul 2016 07:10:35 +0000 (08:10 +0100)
In MultiStageProgressReporter, set a guard when we start the progress
so that it can't happen more than once. This fixes "Initialising
tasks.." being shown twice in succession when running bitbake in
non-interactive terminal mode.

(Bitbake rev: 923e68e069127ee7f6e11b91eb1cfa09d502a110)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/progress.py

index 343b18f8c4aa61f9afffafd5d5e50bbabfe509cd..f54d1c76f8e6f99c69c654d3e9d913e39cffbce4 100644 (file)
@@ -234,10 +234,13 @@ class MultiStageProcessProgressReporter(MultiStageProgressReporter):
     """
     def __init__(self, d, processname, stage_weights, debug=False):
         self._processname = processname
+        self._started = False
         MultiStageProgressReporter.__init__(self, d, stage_weights, debug)
 
     def start(self):
-        bb.event.fire(bb.event.ProcessStarted(self._processname, 100), self._data)
+        if not self._started:
+            bb.event.fire(bb.event.ProcessStarted(self._processname, 100), self._data)
+            self._started = True
 
     def _fire_progress(self, taskprogress):
         if taskprogress == 0: