[bitbake-devel] [PATCH 1/1] bitbake: runqueue: terminate build safely while RunQueueExecuteScenequeue init failed
Hongxu Jia
hongxu.jia at windriver.com
Wed Aug 27 10:44:41 UTC 2014
While RunQueueExecuteScenequeue init failed, the exit of build is mess.
Here is the example while bb.fatal invoked in RunQueueExecuteScenequeue:
...
Traceback (most recent call last):
| File "/home/jiahongxu/yocto/poky/bitbake/lib/bb/runqueue.py",
line 1824, in RunQueueExecuteScenequeue.__init__(rq=<bb.runqueue.RunQueue
instance at 0x7f87dd7d5050>):
| locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname,
"sq_hash" : sq_hash, "sq_hashfn" : sq_hashfn, "d" : self.cooker.data }
| > valid = bb.utils.better_eval(call, locs)
| def better_eval(source, locals):
| > return eval(source, get_context(), locals)
| File "<string>", line 1, in <module>
| File "/home/jiahongxu/yocto/poky/bitbake/lib/bb/__init__.py", line 102,
in fatal:
| logger.critical(''.join(args))
| > raise BBHandledException()
BBHandledException
...
We should terminate build safely while RunQueueExecuteScenequeue init failed.
Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
---
bitbake/lib/bb/runqueue.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index e13dc57..c7b1dc0 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1046,7 +1046,12 @@ class RunQueue:
self.state = runQueueComplete
else:
self.start_worker()
- self.rqexe = RunQueueExecuteScenequeue(self)
+ try:
+ self.rqexe = RunQueueExecuteScenequeue(self)
+ except:
+ # The RunQueueExecuteScenequeue init failure
+ # terminated the build safely
+ self.state = runQueueComplete
if self.state in [runQueueSceneRun, runQueueRunning, runQueueCleanUp]:
self.dm.check(self)
--
1.9.1
More information about the bitbake-devel
mailing list