summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-25 18:43:53 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-26 13:55:21 (GMT)
commitdfdb2eb33e7b899224f011cf6fad50d529a65183 (patch)
treeea90048ecbb6206b4f8f99266eae1163139f0095 /bitbake/lib
parent46d8d04d51f19e6f7652e15844e5a557c6bcb1c9 (diff)
downloadpoky-dfdb2eb33e7b899224f011cf6fad50d529a65183.tar.gz
bitbake: runqueue.py: Gracefully exit if an exception occurs in the runqueue execution code
There was a bug where an exception in the runqueue code would cause an infinite loop of debug messages. The exception would get reported but would loop since runqueue was still registered as an idle handler. This patch adds an exception handler to ensure in the case of errors, the system more gracefully shuts down and doesn't loop. (Bitbake rev: 99467c7e387f6e71358b40b8afae450d72cd68e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/runqueue.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 306ae79..2925741 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -862,7 +862,7 @@ class RunQueue:
862 cache[task] = iscurrent 862 cache[task] = iscurrent
863 return iscurrent 863 return iscurrent
864 864
865 def execute_runqueue(self): 865 def _execute_runqueue(self):
866 """ 866 """
867 Run the tasks in a queue prepared by rqdata.prepare() 867 Run the tasks in a queue prepared by rqdata.prepare()
868 Upon failure, optionally try to recover the build using any alternate providers 868 Upon failure, optionally try to recover the build using any alternate providers
@@ -926,6 +926,14 @@ class RunQueue:
926 # Loop 926 # Loop
927 return retval 927 return retval
928 928
929 def execute_runqueue(self):
930 try:
931 return self._execute_runqueue()
932 except:
933 logger.error("An uncaught exception occured in runqueue, please see the failure below:")
934 self.state = runQueueComplete
935 raise
936
929 def finish_runqueue(self, now = False): 937 def finish_runqueue(self, now = False):
930 if not self.rqexe: 938 if not self.rqexe:
931 return 939 return