Skip to contentSkip to conversation

cooker: shutdown cooker parser on shutdown

PATCH New Ed Bartosh 1 participant 1 message Feb 4, 2016

lore
Share & tools
lore

Ed Bartosh

author
#0 lore raw

PATCH 1/1 cooker: shutdown cooker parser on shutdown

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]

---
 bitbake/lib/bb/cooker.py | 3 +++
 1 file changed, 3 insertions(+)
bitbake/lib/bb/cooker.py +3 -0
index edd682b..df730f6 100644
@@ -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
 
Signature · 1 line
2.1.4