diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-13 21:00:10 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-13 21:00:10 +0100 |
commit | fe0f86e15ce89fef28865e75a614b06a3fc76bc9 (patch) | |
tree | 286005beffa62004a723abb76a6153cd0cecd573 /bitbake | |
parent | 474c2a2817acbea8ae79dd28ce026ffa1294b120 (diff) | |
download | poky-fe0f86e15ce89fef28865e75a614b06a3fc76bc9.tar.gz |
bitbake/runqueue: Remove now unneeded indentation
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 89 |
1 files changed, 44 insertions, 45 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 608deaed6a..201f427f45 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -1166,59 +1166,58 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
1166 | # nothing to do | 1166 | # nothing to do |
1167 | self.rq.state = runQueueCleanUp | 1167 | self.rq.state = runQueueCleanUp |
1168 | 1168 | ||
1169 | while True: | 1169 | task = None |
1170 | task = None | 1170 | if self.stats.active < self.number_tasks: |
1171 | if self.stats.active < self.number_tasks: | 1171 | task = self.sched.next() |
1172 | task = self.sched.next() | 1172 | if task is not None: |
1173 | if task is not None: | 1173 | fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]] |
1174 | fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]] | ||
1175 | |||
1176 | taskname = self.rqdata.runq_task[task] | ||
1177 | if self.rq.check_stamp_task(task, taskname): | ||
1178 | bb.msg.debug(2, bb.msg.domain.RunQueue, "Stamp current task %s (%s)" % (task, self.rqdata.get_user_idstring(task))) | ||
1179 | self.task_skip(task) | ||
1180 | return True | ||
1181 | 1174 | ||
1182 | bb.event.fire(runQueueTaskStarted(task, self.stats, self.rq), self.cfgData) | 1175 | taskname = self.rqdata.runq_task[task] |
1183 | bb.msg.note(1, bb.msg.domain.RunQueue, | 1176 | if self.rq.check_stamp_task(task, taskname): |
1184 | "Running task %d of %d (ID: %s, %s)" % (self.stats.completed + self.stats.active + self.stats.failed + 1, | 1177 | bb.msg.debug(2, bb.msg.domain.RunQueue, "Stamp current task %s (%s)" % (task, self.rqdata.get_user_idstring(task))) |
1185 | self.stats.total, | 1178 | self.task_skip(task) |
1186 | task, | 1179 | return True |
1187 | self.rqdata.get_user_idstring(task))) | ||
1188 | |||
1189 | proc = self.fork_off_task(fn, task, taskname) | ||
1190 | |||
1191 | self.build_pids[proc.pid] = task | ||
1192 | self.build_procs[proc.pid] = proc | ||
1193 | self.build_pipes[proc.pid] = runQueuePipe(proc.stdout, proc.stdin, self.cfgData) | ||
1194 | self.runq_running[task] = 1 | ||
1195 | self.stats.taskActive() | ||
1196 | if self.stats.active < self.number_tasks: | ||
1197 | return True | ||
1198 | 1180 | ||
1199 | for pipe in self.build_pipes: | 1181 | bb.event.fire(runQueueTaskStarted(task, self.stats, self.rq), self.cfgData) |
1200 | self.build_pipes[pipe].read() | 1182 | bb.msg.note(1, bb.msg.domain.RunQueue, |
1183 | "Running task %d of %d (ID: %s, %s)" % (self.stats.completed + self.stats.active + self.stats.failed + 1, | ||
1184 | self.stats.total, | ||
1185 | task, | ||
1186 | self.rqdata.get_user_idstring(task))) | ||
1201 | 1187 | ||
1202 | if self.stats.active > 0: | 1188 | proc = self.fork_off_task(fn, task, taskname) |
1203 | if self.runqueue_process_waitpid() is None: | ||
1204 | return 0.5 | ||
1205 | return True | ||
1206 | 1189 | ||
1207 | if len(self.failed_fnids) != 0: | 1190 | self.build_pids[proc.pid] = task |
1208 | self.rq.state = runQueueFailed | 1191 | self.build_procs[proc.pid] = proc |
1192 | self.build_pipes[proc.pid] = runQueuePipe(proc.stdout, proc.stdin, self.cfgData) | ||
1193 | self.runq_running[task] = 1 | ||
1194 | self.stats.taskActive() | ||
1195 | if self.stats.active < self.number_tasks: | ||
1209 | return True | 1196 | return True |
1210 | 1197 | ||
1211 | # Sanity Checks | 1198 | for pipe in self.build_pipes: |
1212 | for task in range(self.stats.total): | 1199 | self.build_pipes[pipe].read() |
1213 | if self.runq_buildable[task] == 0: | 1200 | |
1214 | bb.msg.error(bb.msg.domain.RunQueue, "Task %s never buildable!" % task) | 1201 | if self.stats.active > 0: |
1215 | if self.runq_running[task] == 0: | 1202 | if self.runqueue_process_waitpid() is None: |
1216 | bb.msg.error(bb.msg.domain.RunQueue, "Task %s never ran!" % task) | 1203 | return 0.5 |
1217 | if self.runq_complete[task] == 0: | ||
1218 | bb.msg.error(bb.msg.domain.RunQueue, "Task %s never completed!" % task) | ||
1219 | self.rq.state = runQueueComplete | ||
1220 | return True | 1204 | return True |
1221 | 1205 | ||
1206 | if len(self.failed_fnids) != 0: | ||
1207 | self.rq.state = runQueueFailed | ||
1208 | return True | ||
1209 | |||
1210 | # Sanity Checks | ||
1211 | for task in range(self.stats.total): | ||
1212 | if self.runq_buildable[task] == 0: | ||
1213 | bb.msg.error(bb.msg.domain.RunQueue, "Task %s never buildable!" % task) | ||
1214 | if self.runq_running[task] == 0: | ||
1215 | bb.msg.error(bb.msg.domain.RunQueue, "Task %s never ran!" % task) | ||
1216 | if self.runq_complete[task] == 0: | ||
1217 | bb.msg.error(bb.msg.domain.RunQueue, "Task %s never completed!" % task) | ||
1218 | self.rq.state = runQueueComplete | ||
1219 | return True | ||
1220 | |||
1222 | class RunQueueExecuteScenequeue(RunQueueExecute): | 1221 | class RunQueueExecuteScenequeue(RunQueueExecute): |
1223 | def __init__(self, rq): | 1222 | def __init__(self, rq): |
1224 | RunQueueExecute.__init__(self, rq) | 1223 | RunQueueExecute.__init__(self, rq) |