summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/uihelper.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-29 19:38:47 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-29 19:43:04 +0100
commit5b84c902ebbd0b034c6f328eb44054e2f92556d3 (patch)
tree1794c131ced8d34cf714e2573d32b23ad8ed20f2 /bitbake/lib/bb/ui/uihelper.py
parent3774cf0fdc0d61532f10112b3cf3bc65f4084b53 (diff)
downloadpoky-5b84c902ebbd0b034c6f328eb44054e2f92556d3.tar.gz
uihelper: Keep track of pids in execution order
(Bitbake rev: cec2f3eaa45a6fd8d3c53c09aaf010ac6101e7ba) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/uihelper.py')
-rw-r--r--bitbake/lib/bb/ui/uihelper.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/uihelper.py b/bitbake/lib/bb/ui/uihelper.py
index c96f381c54..2c78695377 100644
--- a/bitbake/lib/bb/ui/uihelper.py
+++ b/bitbake/lib/bb/ui/uihelper.py
@@ -23,6 +23,8 @@ class BBUIHelper:
23 def __init__(self): 23 def __init__(self):
24 self.needUpdate = False 24 self.needUpdate = False
25 self.running_tasks = {} 25 self.running_tasks = {}
26 # Running PIDs preserves the order tasks were executed in
27 self.running_pids = []
26 self.failed_tasks = [] 28 self.failed_tasks = []
27 self.tasknumber_current = 0 29 self.tasknumber_current = 0
28 self.tasknumber_total = 0 30 self.tasknumber_total = 0
@@ -30,16 +32,20 @@ class BBUIHelper:
30 def eventHandler(self, event): 32 def eventHandler(self, event):
31 if isinstance(event, bb.build.TaskStarted): 33 if isinstance(event, bb.build.TaskStarted):
32 self.running_tasks[event.pid] = { 'title' : "%s %s" % (event._package, event._task) } 34 self.running_tasks[event.pid] = { 'title' : "%s %s" % (event._package, event._task) }
35 self.running_pids.append(event.pid)
33 self.needUpdate = True 36 self.needUpdate = True
34 if isinstance(event, bb.build.TaskSucceeded): 37 if isinstance(event, bb.build.TaskSucceeded):
35 del self.running_tasks[event.pid] 38 del self.running_tasks[event.pid]
39 self.running_pids.remove(event.pid)
36 self.needUpdate = True 40 self.needUpdate = True
37 if isinstance(event, bb.build.TaskFailedSilent): 41 if isinstance(event, bb.build.TaskFailedSilent):
38 del self.running_tasks[event.pid] 42 del self.running_tasks[event.pid]
43 self.running_pids.remove(event.pid)
39 # Don't add to the failed tasks list since this is e.g. a setscene task failure 44 # Don't add to the failed tasks list since this is e.g. a setscene task failure
40 self.needUpdate = True 45 self.needUpdate = True
41 if isinstance(event, bb.build.TaskFailed): 46 if isinstance(event, bb.build.TaskFailed):
42 del self.running_tasks[event.pid] 47 del self.running_tasks[event.pid]
48 self.running_pids.remove(event.pid)
43 self.failed_tasks.append( { 'title' : "%s %s" % (event._package, event._task)}) 49 self.failed_tasks.append( { 'title' : "%s %s" % (event._package, event._task)})
44 self.needUpdate = True 50 self.needUpdate = True
45 if isinstance(event, bb.runqueue.runQueueTaskStarted): 51 if isinstance(event, bb.runqueue.runQueueTaskStarted):