summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-19 22:35:33 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-19 22:36:26 +0100
commit6739a629e96a93c037e4d863e7f842a317c0c571 (patch)
tree15a55758b52c6e5f9e544713a06519ac4e20dbf8 /bitbake
parentb6bfe1420517aa5aa190e17dca40ea70f09effd9 (diff)
downloadpoky-6739a629e96a93c037e4d863e7f842a317c0c571.tar.gz
bitbake/runqueue.py: Fix runqueue UI issues
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py44
1 files changed, 27 insertions, 17 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index b2d5fc01ab..82d6c84c0b 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -683,7 +683,7 @@ class RunQueueData:
683 setscene = taskData.gettask_id(self.taskData.fn_index[self.runq_fnid[task]], self.runq_task[task] + "_setscene", False) 683 setscene = taskData.gettask_id(self.taskData.fn_index[self.runq_fnid[task]], self.runq_task[task] + "_setscene", False)
684 if not setscene: 684 if not setscene:
685 continue 685 continue
686 bb.note("Found setscene for %s %s" % (self.taskData.fn_index[self.runq_fnid[task]], self.runq_task[task])) 686 #bb.note("Found setscene for %s %s" % (self.taskData.fn_index[self.runq_fnid[task]], self.runq_task[task]))
687 self.runq_setscene.append(task) 687 self.runq_setscene.append(task)
688 688
689 def dump_data(self, taskQueue): 689 def dump_data(self, taskQueue):
@@ -898,8 +898,8 @@ class RunQueue:
898 898
899 if self.state is runQueueFailed: 899 if self.state is runQueueFailed:
900 if not self.rqdata.taskData.tryaltconfigs: 900 if not self.rqdata.taskData.tryaltconfigs:
901 raise bb.runqueue.TaskFailure(self.failed_fnids) 901 raise bb.runqueue.TaskFailure(self.rqexe.failed_fnids)
902 for fnid in self.failed_fnids: 902 for fnid in self.rqexe.failed_fnids:
903 self.rqdata.taskData.fail_fnid(fnid) 903 self.rqdata.taskData.fail_fnid(fnid)
904 self.rqdata.reset() 904 self.rqdata.reset()
905 905
@@ -959,9 +959,6 @@ class RunQueueExecute:
959 self.task_fail(task, proc.returncode) 959 self.task_fail(task, proc.returncode)
960 else: 960 else:
961 self.task_complete(task) 961 self.task_complete(task)
962 self.stats.taskCompleted()
963 bb.event.fire(runQueueTaskCompleted(task, self.stats, self.rq), self.cfgData)
964
965 962
966 def finish_now(self): 963 def finish_now(self):
967 if self.stats.active: 964 if self.stats.active:
@@ -997,13 +994,6 @@ class RunQueueExecute:
997 sys.stderr.flush() 994 sys.stderr.flush()
998 995
999 try: 996 try:
1000 bb.event.fire(runQueueTaskStarted(task, self.stats, self.rq), self.cfgData)
1001 bb.msg.note(1, bb.msg.domain.RunQueue,
1002 "Running task %d of %d (ID: %s, %s)" % (self.stats.completed + self.stats.active + self.stats.failed + 1,
1003 self.stats.total,
1004 task,
1005 self.rqdata.get_user_idstring(task)))
1006
1007 the_data = self.cooker.bb_cache.loadDataFull(fn, self.cooker.get_file_appends(fn), self.cooker.configuration.data) 997 the_data = self.cooker.bb_cache.loadDataFull(fn, self.cooker.get_file_appends(fn), self.cooker.configuration.data)
1008 998
1009 env = bb.data.export_vars(the_data) 999 env = bb.data.export_vars(the_data)
@@ -1070,7 +1060,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
1070 self.sched = RunQueueSchedulerSpeed(self, self.rqdata) 1060 self.sched = RunQueueSchedulerSpeed(self, self.rqdata)
1071 1061
1072 1062
1073 def task_complete(self, task): 1063 def task_completeoutright(self, task):
1074 """ 1064 """
1075 Mark a task as completed 1065 Mark a task as completed
1076 Look at the reverse dependencies and mark any task with 1066 Look at the reverse dependencies and mark any task with
@@ -1092,6 +1082,11 @@ class RunQueueExecuteTasks(RunQueueExecute):
1092 taskname = self.rqdata.runq_task[revdep] 1082 taskname = self.rqdata.runq_task[revdep]
1093 bb.msg.debug(1, bb.msg.domain.RunQueue, "Marking task %s (%s, %s) as buildable" % (revdep, fn, taskname)) 1083 bb.msg.debug(1, bb.msg.domain.RunQueue, "Marking task %s (%s, %s) as buildable" % (revdep, fn, taskname))
1094 1084
1085 def task_complete(self, task):
1086 self.stats.taskCompleted()
1087 bb.event.fire(runQueueTaskCompleted(task, self.stats, self.rq), self.cfgData)
1088 self.task_completeoutright(task)
1089
1095 def task_fail(self, task, exitcode): 1090 def task_fail(self, task, exitcode):
1096 """ 1091 """
1097 Called when a task has failed 1092 Called when a task has failed
@@ -1108,7 +1103,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
1108 def task_skip(self, task): 1103 def task_skip(self, task):
1109 self.runq_running[task] = 1 1104 self.runq_running[task] = 1
1110 self.runq_buildable[task] = 1 1105 self.runq_buildable[task] = 1
1111 self.task_complete(task) 1106 self.task_completeoutright(task)
1112 self.stats.taskCompleted() 1107 self.stats.taskCompleted()
1113 self.stats.taskSkipped() 1108 self.stats.taskSkipped()
1114 1109
@@ -1134,6 +1129,13 @@ class RunQueueExecuteTasks(RunQueueExecute):
1134 self.task_skip(task) 1129 self.task_skip(task)
1135 continue 1130 continue
1136 1131
1132 bb.event.fire(runQueueTaskStarted(task, self.stats, self.rq), self.cfgData)
1133 bb.msg.note(1, bb.msg.domain.RunQueue,
1134 "Running task %d of %d (ID: %s, %s)" % (self.stats.completed + self.stats.active + self.stats.failed + 1,
1135 self.stats.total,
1136 task,
1137 self.rqdata.get_user_idstring(task)))
1138
1137 proc = self.fork_off_task(fn, task, taskname) 1139 proc = self.fork_off_task(fn, task, taskname)
1138 1140
1139 self.build_pids[proc.pid] = task 1141 self.build_pids[proc.pid] = task
@@ -1264,7 +1266,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
1264 if len(self.sq_revdeps2[dep]) == 0: 1266 if len(self.sq_revdeps2[dep]) == 0:
1265 self.runq_buildable[dep] = 1 1267 self.runq_buildable[dep] = 1
1266 1268
1267 def task_complete(self, task): 1269 def task_completeoutright(self, task):
1268 """ 1270 """
1269 Mark a task as completed 1271 Mark a task as completed
1270 Look at the reverse dependencies and mark any task with 1272 Look at the reverse dependencies and mark any task with
@@ -1277,6 +1279,10 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
1277 self.scenequeue_covered.add(task) 1279 self.scenequeue_covered.add(task)
1278 self.scenequeue_updatecounters(task) 1280 self.scenequeue_updatecounters(task)
1279 1281
1282 def task_complete(self, task):
1283 self.stats.taskCompleted()
1284 self.task_completeoutright(task)
1285
1280 def task_fail(self, task, result): 1286 def task_fail(self, task, result):
1281 self.stats.taskFailed() 1287 self.stats.taskFailed()
1282 index = self.rqdata.runq_setscene[task] 1288 index = self.rqdata.runq_setscene[task]
@@ -1296,7 +1302,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
1296 def task_skip(self, task): 1302 def task_skip(self, task):
1297 self.runq_running[task] = 1 1303 self.runq_running[task] = 1
1298 self.runq_buildable[task] = 1 1304 self.runq_buildable[task] = 1
1299 self.task_complete(task) 1305 self.task_completeoutright(task)
1300 self.stats.taskCompleted() 1306 self.stats.taskCompleted()
1301 self.stats.taskSkipped() 1307 self.stats.taskSkipped()
1302 1308
@@ -1338,6 +1344,10 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
1338 self.task_skip(task) 1344 self.task_skip(task)
1339 return True 1345 return True
1340 1346
1347 bb.msg.note(1, bb.msg.domain.RunQueue,
1348 "Running setscene task %d of %d (%s:%s)" % (self.stats.completed + self.stats.active + self.stats.failed + 1,
1349 self.stats.total, fn, taskname))
1350
1341 proc = self.fork_off_task(fn, realtask, taskname) 1351 proc = self.fork_off_task(fn, realtask, taskname)
1342 1352
1343 self.build_pids[proc.pid] = task 1353 self.build_pids[proc.pid] = task