aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/progress.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-07-23 00:18:39 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-25 09:22:06 +0100
commit923e68e069127ee7f6e11b91eb1cfa09d502a110 (patch)
tree7fa8872a40ead5f732cbbf83393a176673ab418a /lib/bb/progress.py
parent235db4870b11db97250979e647b54cdb5ce4fbb6 (diff)
downloadbitbake-923e68e069127ee7f6e11b91eb1cfa09d502a110.tar.gz
lib/bb/progress: avoid possibility of start event being reported twice
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/progress.py')
-rw-r--r--lib/bb/progress.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/progress.py b/lib/bb/progress.py
index 343b18f8c..f54d1c76f 100644
--- a/lib/bb/progress.py
+++ b/lib/bb/progress.py
@@ -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: