[bitbake-devel] [PATCH] cooker: shutdown cooker parser on shutdown

Ed Bartosh ed.bartosh at linux.intel.com
Thu Feb 4 17:23:39 UTC 2016


Currently any not catched exception in cooker causes bitbake
to hang because of not terminated children of CookerParser.

Long term solution would be to reimplement Cooker as a context
manager and terminate parser children in its __exit__ method.

Partial fix is to call CookerParser.shutdown in Cooker.shutdown in
hope that all Cooker exceptions are caught and shutdown method is
called.

[YOCTO #8900]

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
 bitbake/lib/bb/cooker.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index edd682b..df730f6 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1635,6 +1635,9 @@ class BBCooker:
         else:
             self.state = state.shutdown
 
+        if self.parser:
+            self.parser.shutdown(clean=not force, force=force)
+
     def finishcommand(self):
         self.state = state.initial
 
-- 
2.1.4




More information about the bitbake-devel mailing list