summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/ui/knotty.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-01-21 23:49:17 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-01-21 23:49:17 +0000
commit5ebad0d500562a132067b423bb6711e8893f2859 (patch)
tree395567a09b82a0bf89331d32f927fbe77496ec79 /bitbake/lib/bb/ui/knotty.py
parent5c62833766048b83c0d7ea9e77194b9ca6af7fb1 (diff)
downloadopenembedded-core-5ebad0d500562a132067b423bb6711e8893f2859.tar.gz
openembedded-core-5ebad0d500562a132067b423bb6711e8893f2859.tar.bz2
openembedded-core-5ebad0d500562a132067b423bb6711e8893f2859.tar.xz
openembedded-core-5ebad0d500562a132067b423bb6711e8893f2859.zip
knotty: Improve task failure message handling using the uihelper code
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/ui/knotty.py')
-rw-r--r--bitbake/lib/bb/ui/knotty.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index c69fd6ca6..7264c7916 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):