summaryrefslogtreecommitdiffstats
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-26 08:10:35 +0100
commitc27ae255db1484cbee68ae13d726e923d78a9640 (patch)
treeb39dd6868e14c9b4b52b03f2099d2dda0d814343
parent5f4559b2eb8cbf633ee2c923c0b5e23a24b1ec06 (diff)
downloadpoky-c27ae255db1484cbee68ae13d726e923d78a9640.tar.gz
bitbake: 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. (Bitbake rev: 923e68e069127ee7f6e11b91eb1cfa09d502a110) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/progress.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/progress.py b/bitbake/lib/bb/progress.py
index 343b18f8c4..f54d1c76f8 100644
--- a/bitbake/lib/bb/progress.py
+++ b/bitbake/lib/bb/progress.py
@@ -234,10 +234,13 @@ class MultiStageProcessProgressReporter(MultiStageProgressReporter):
234 """ 234 """
235 def __init__(self, d, processname, stage_weights, debug=False): 235 def __init__(self, d, processname, stage_weights, debug=False):
236 self._processname = processname 236 self._processname = processname
237 self._started = False
237 MultiStageProgressReporter.__init__(self, d, stage_weights, debug) 238 MultiStageProgressReporter.__init__(self, d, stage_weights, debug)
238 239
239 def start(self): 240 def start(self):
240 bb.event.fire(bb.event.ProcessStarted(self._processname, 100), self._data) 241 if not self._started:
242 bb.event.fire(bb.event.ProcessStarted(self._processname, 100), self._data)
243 self._started = True
241 244
242 def _fire_progress(self, taskprogress): 245 def _fire_progress(self, taskprogress):
243 if taskprogress == 0: 246 if taskprogress == 0: