From 5ebad0d500562a132067b423bb6711e8893f2859 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 21 Jan 2010 23:49:17 +0000 Subject: knotty: Improve task failure message handling using the uihelper code Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/knotty.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'bitbake/lib/bb/ui/knotty.py') diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index c69fd6ca64..7264c7916c 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py @@ -23,6 +23,9 @@ import os import sys import itertools import xmlrpclib +from bb import ui +from bb.ui import uihelper + parsespin = itertools.cycle( r'|/-\\' ) @@ -32,6 +35,8 @@ def init(server, eventHandler): includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"]) loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"]) + helper = uihelper.BBUIHelper() + try: cmdline = server.runCommand(["getCmdLineAction"]) #print cmdline @@ -53,6 +58,19 @@ def init(server, eventHandler): if event is None: continue #print event + helper.eventHandler(event) + if isinstance(event, bb.runqueue.runQueueExitWait): + if not shutdown: + shutdown = 1 + if shutdown and helper.needUpdate: + activetasks, failedtasks = helper.getTasks() + if activetasks: + print "Waiting for %s active tasks to finish:" % len(activetasks) + tasknum = 1 + for task in activetasks: + print "%s: %s (pid %s)" % (tasknum, activetasks[task]["title"], task) + tasknum = tasknum + 1 + if isinstance(event, bb.msg.MsgPlain): print event._message continue @@ -139,6 +157,8 @@ def init(server, eventHandler): continue if isinstance(event, bb.runqueue.runQueueEvent): continue + if isinstance(event, bb.runqueue.runQueueExitWait): + continue if isinstance(event, bb.event.StampUpdate): continue if isinstance(event, bb.event.ConfigParsed): -- cgit v1.2.3-54-g00ecf