summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/ui/knotty.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index a1856ecd77..79325bb6e4 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -170,6 +170,7 @@ class TerminalFilter(object):
170 self.interactive = sys.stdout.isatty() 170 self.interactive = sys.stdout.isatty()
171 self.footer_present = False 171 self.footer_present = False
172 self.lastpids = [] 172 self.lastpids = []
173 self.lasttime = None
173 self.quiet = quiet 174 self.quiet = quiet
174 175
175 if not self.interactive: 176 if not self.interactive:
@@ -226,6 +227,10 @@ class TerminalFilter(object):
226 activetasks = self.helper.running_tasks 227 activetasks = self.helper.running_tasks
227 failedtasks = self.helper.failed_tasks 228 failedtasks = self.helper.failed_tasks
228 runningpids = self.helper.running_pids 229 runningpids = self.helper.running_pids
230 currenttime = time.time()
231 if not self.lasttime or (currenttime - self.lasttime > 5):
232 self.helper.needUpdate = True
233 self.lasttime = currenttime
229 if self.footer_present and not self.helper.needUpdate: 234 if self.footer_present and not self.helper.needUpdate:
230 return 235 return
231 self.helper.needUpdate = False 236 self.helper.needUpdate = False
@@ -250,7 +255,11 @@ class TerminalFilter(object):
250 activetasks[t]["progressbar"] = pbar 255 activetasks[t]["progressbar"] = pbar
251 tasks.append((pbar, progress, rate, start_time)) 256 tasks.append((pbar, progress, rate, start_time))
252 else: 257 else:
253 tasks.append("%s (pid %s)" % (activetasks[t]["title"], t)) 258 start_time = activetasks[t].get("starttime", None)
259 if start_time:
260 tasks.append("%s - %ds (pid %s)" % (activetasks[t]["title"], currenttime - start_time, t))
261 else:
262 tasks.append("%s (pid %s)" % (activetasks[t]["title"], t))
254 263
255 if self.main.shutdown: 264 if self.main.shutdown:
256 content = "Waiting for %s running tasks to finish:" % len(activetasks) 265 content = "Waiting for %s running tasks to finish:" % len(activetasks)