summaryrefslogtreecommitdiffstats
path: root/lib/bb/ui
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-08-11 15:36:58 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-17 10:20:32 +0100
commit7c78a1cd3f0638ae76f7c7a469b7f667c7c58090 (patch)
treee7e7c344053794a2e6a9e978d89650d279892756 /lib/bb/ui
parentde6759d8e9990e426e6d6464a2e05381cd4c12d6 (diff)
downloadbitbake-contrib-7c78a1cd3f0638ae76f7c7a469b7f667c7c58090.tar.gz
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/ui')
-rw-r--r--lib/bb/ui/knotty.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 1723a72a8..f89f7b3c3 100644
--- a/lib/bb/ui/knotty.py
+++ b/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: