mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
bitbake: knotty: Correctly handle multiple line items
Currently the footer code doesn't quite handle multiline items correct. Fix this to do so. (Bitbake rev: 8eeccf73185d986c6abd6426b1d1e72da3a982df) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -292,9 +292,9 @@ class TerminalFilter(object):
|
||||
progress = 0
|
||||
content = self.main_progress.update(progress)
|
||||
print('')
|
||||
lines = 1 + int(len(content) / (self.columns + 1))
|
||||
lines = self.getlines(content)
|
||||
if self.quiet == 0:
|
||||
for tasknum, task in enumerate(tasks[:(self.rows - 2)]):
|
||||
for tasknum, task in enumerate(tasks[:(self.rows - 1 - lines)]):
|
||||
if isinstance(task, tuple):
|
||||
pbar, progress, rate, start_time = task
|
||||
if not pbar.start_time:
|
||||
@@ -311,11 +311,17 @@ class TerminalFilter(object):
|
||||
else:
|
||||
content = "%s: %s" % (tasknum, task)
|
||||
print(content)
|
||||
lines = lines + 1 + int(len(content) / (self.columns + 1))
|
||||
lines = lines + self.getlines(content)
|
||||
self.footer_present = lines
|
||||
self.lastpids = runningpids[:]
|
||||
self.lastcount = self.helper.tasknumber_current
|
||||
|
||||
def getlines(self, content):
|
||||
lines = 0
|
||||
for line in content.split("\n"):
|
||||
lines = lines + 1 + int(len(line) / (self.columns + 1))
|
||||
return lines
|
||||
|
||||
def finish(self):
|
||||
if self.stdinbackup:
|
||||
fd = sys.stdin.fileno()
|
||||
|
||||
Reference in New Issue
Block a user