[bitbake-devel] [PATCH 04/10] cooker: add generic method to locate configuration files

Joshua Lock josh at linux.intel.com
Fri Jul 1 06:02:50 UTC 2011


Convert _findLayerConf(self) to _findConfigFile(self, configfile) so that
the core functionality of the method can be used elsewhere.

Signed-off-by: Joshua Lock <josh at linux.intel.com>
---
 lib/bb/cooker.py |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 4ad1536..94acce6 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -643,15 +643,18 @@ class BBCooker:
         else:
             shell.start( self )
 
-    def _findLayerConf(self):
+    def _findConfigFile(self, configfile):
         path = os.getcwd()
         while path != "/":
-            bblayers = os.path.join(path, "conf", "bblayers.conf")
-            if os.path.exists(bblayers):
-                return bblayers
+            confpath = os.path.join(path, "conf", configfile)
+            if os.path.exists(confpath):
+                return confpath
 
             path, _ = os.path.split(path)
 
+    def _findLayerConf(self):
+        return self._findConfigFile("bblayers.conf")
+
     def parseConfigurationFiles(self, files):
         data = self.configuration.data
         bb.parse.init_parser(data)
-- 
1.7.5.4





More information about the bitbake-devel mailing list