[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1844/8267] bitbake: knotty: fix task progress bar not starting at 0%
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 1844/8267] bitbake: knotty: fix task progress bar not starting at 0%
- Date: Sat, 16 Dec 2017 22:23:48 +0000 (UTC)
commit ea0800049d5a897ddf935ecdaa6e7d810166367b
Author: Paul Eggleton <paul eggleton linux intel com>
Date: Thu Aug 11 15:36:58 2016 +1200
bitbake: knotty: fix task progress bar not starting at 0%
If we have the task number here we need to subtract 1 to get the number
of tasks completed.
(Bitbake rev: 7c78a1cd3f0638ae76f7c7a469b7f667c7c58090)
Signed-off-by: Paul Eggleton <paul eggleton linux intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
bitbake/lib/bb/ui/knotty.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 1723a72..f89f7b3 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -260,13 +260,16 @@ class TerminalFilter(object):
content = "No currently running tasks (%s of %s)" % (self.helper.tasknumber_current,
self.helper.tasknumber_total)
else:
content = "Currently %2s running tasks (%s of %s)" % (len(activetasks),
self.helper.tasknumber_current, self.helper.tasknumber_total)
- maxtask = self.helper.tasknumber_total + 1
+ maxtask = self.helper.tasknumber_total
if not self.main_progress or self.main_progress.maxval != maxtask:
widgets = [' ', progressbar.Percentage(), ' ', progressbar.Bar()]
self.main_progress = BBProgress("Running tasks", maxtask, widgets=widgets)
self.main_progress.start(False)
self.main_progress.setmessage(content)
- self.main_progress.update(self.helper.tasknumber_current)
+ progress = self.helper.tasknumber_current - 1
+ if progress < 0:
+ progress = 0
+ self.main_progress.update(progress)
print('')
lines = 1 + int(len(content) / (self.columns + 1))
if not self.quiet:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]