[oe-commits] [bitbake] 03/18: lib/bb/progress: avoid possibility of start event being reported twice
git at git.openembedded.org
git at git.openembedded.org
Mon Jul 25 08:59:08 UTC 2016
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 923e68e069127ee7f6e11b91eb1cfa09d502a110
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Sat Jul 23 00:18:39 2016 +1200
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 at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/progress.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/bb/progress.py b/lib/bb/progress.py
index 343b18f..f54d1c7 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:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list