* [PATCH 0/1] knotty: ensure progress bar output is accounted for in display
@ 2016-09-23 9:14 Paul Eggleton
2016-09-23 9:14 ` [PATCH 1/1] " Paul Eggleton
0 siblings, 1 reply; 2+ messages in thread
From: Paul Eggleton @ 2016-09-23 9:14 UTC (permalink / raw)
To: bitbake-devel
The following changes since commit ca4f5e6d01b5c8cf315f59bc86194d63c0d3d042:
cooker/providers: Only add target to world build if task exists (2016-09-21 22:33:47 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib paule/bb-progress-fix3
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/bb-progress-fix3
Paul Eggleton (1):
knotty: ensure progress bar output is accounted for in display
lib/bb/ui/knotty.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--
2.5.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] knotty: ensure progress bar output is accounted for in display
2016-09-23 9:14 [PATCH 0/1] knotty: ensure progress bar output is accounted for in display Paul Eggleton
@ 2016-09-23 9:14 ` Paul Eggleton
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggleton @ 2016-09-23 9:14 UTC (permalink / raw)
To: bitbake-devel
When calculating how many lines we'd printed we weren't properly taking
the progress bars into account, with the result that sometimes if the
last line printed on the terminal wrapped to the next line (which is
possible) we backed up less lines than we should have.
Additionally, we should always print a newline after updating the
progress bar - there's no need to check if there wasn't output (there
always will be courtesy of our overridden _need_update()) and we now
allow the line to wrap so we don't need to check the other condition
either.
Hopefully this will fix [YOCTO #10046].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
lib/bb/ui/knotty.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index a1856ec..1ae5a11 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -271,7 +271,7 @@ class TerminalFilter(object):
progress = self.helper.tasknumber_current - 1
if progress < 0:
progress = 0
- self.main_progress.update(progress)
+ content = self.main_progress.update(progress)
print('')
lines = 1 + int(len(content) / (self.columns + 1))
if not self.quiet:
@@ -285,11 +285,10 @@ class TerminalFilter(object):
pbar.setmessage('%s:%s' % (tasknum, pbar.msg.split(':', 1)[1]))
if progress > -1:
pbar.setextra(rate)
- output = pbar.update(progress)
+ content = pbar.update(progress)
else:
- output = pbar.update(1)
- if not output or (len(output) <= pbar.term_width):
- print('')
+ content = pbar.update(1)
+ print('')
else:
content = "%s: %s" % (tasknum, task)
print(content)
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-23 9:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-23 9:14 [PATCH 0/1] knotty: ensure progress bar output is accounted for in display Paul Eggleton
2016-09-23 9:14 ` [PATCH 1/1] " Paul Eggleton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.