[bitbake-devel] [PATCH 2/2] tinfoil.py: Add shutdown method.
Aníbal Limón
anibal.limon at linux.intel.com
Fri Jul 3 20:40:27 UTC 2015
When run tinfoil in a loop it causing problems for don't
free resources like OS max fd exception.
Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
lib/bb/tinfoil.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py
index 8fc9be3..5025e62 100644
--- a/lib/bb/tinfoil.py
+++ b/lib/bb/tinfoil.py
@@ -28,6 +28,7 @@ import bb.utils
from bb.cooker import state, BBCooker, CookerFeatures
from bb.cookerdata import CookerConfiguration, ConfigParameters
import bb.fetch2
+from bb import BBHandledException
class Tinfoil:
def __init__(self, output=sys.stdout, tracking=False):
@@ -84,6 +85,13 @@ class Tinfoil:
else:
self.parseRecipes()
+ def shutdown(self):
+ try:
+ self.cooker.shutdown()
+ self.cooker.updateCache()
+ except BBHandledException:
+ pass
+
class TinfoilConfigParameters(ConfigParameters):
def __init__(self, **options):
--
1.9.1
More information about the bitbake-devel
mailing list