summaryrefslogtreecommitdiff
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-07-06 17:45:18 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-16 12:31:20 +0100
commit6598f98ba8fc2d058a1a5d948b48f81a2b052776 (patch)
tree40a66ba45550449c46086422ea6c172061da1c67 /bitbake/lib
parent8c238504536c9af824557622a1e284ebf0b884a5 (diff)
downloadopenembedded-core-6598f98ba8fc2d058a1a5d948b48f81a2b052776.tar.gz
openembedded-core-6598f98ba8fc2d058a1a5d948b48f81a2b052776.tar.bz2
openembedded-core-6598f98ba8fc2d058a1a5d948b48f81a2b052776.tar.xz
openembedded-core-6598f98ba8fc2d058a1a5d948b48f81a2b052776.zip
bitbake: runqueue: Allow passing of success/failure handlers to runqueue_process_waitpid()
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/runqueue.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 31978d49b..f9acd9ca2 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -956,7 +956,7 @@ class RunQueue:
self.build_pipes[pipe].read()
if self.stats.active > 0:
- if self.runqueue_process_waitpid() is None:
+ if self.runqueue_process_waitpid(self.task_complete, self.task_fail) is None:
return
continue
@@ -975,7 +975,7 @@ class RunQueue:
self.state = runQueueComplete
return
- def runqueue_process_waitpid(self):
+ def runqueue_process_waitpid(self, success, failure):
"""
Return none is there are no processes awaiting result collection, otherwise
collect the process exit codes and close the information pipe.
@@ -988,9 +988,9 @@ class RunQueue:
self.build_pipes[result[0]].close()
del self.build_pipes[result[0]]
if result[1] != 0:
- self.task_fail(task, result[1])
+ failure(task, result[1])
else:
- self.task_complete(task)
+ success(task)
self.stats.taskCompleted()
bb.event.fire(runQueueTaskCompleted(task, self.stats, self), self.cfgData)
@@ -1016,7 +1016,7 @@ class RunQueue:
try:
while self.stats.active > 0:
bb.event.fire(runQueueExitWait(self.stats.active), self.cfgData)
- if self.runqueue_process_waitpid() is None:
+ if self.runqueue_process_waitpid(self.task_complete, self.task_fail) is None:
return
except:
self.finish_runqueue_now()