From 6769269bea2983a4036a535b3e679e13126318ed Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Thu, 30 Jun 2011 23:02:50 -0700 Subject: cooker: add generic method to locate configuration files Convert _findLayerConf(self) to _findConfigFile(self, configfile) so that the core functionality of the method can be used elsewhere. (Bitbake rev: c515b76c3a27d57d5ae8dddf15cc836811b24ee1) Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index a6f3befe15..369444b9b3 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -646,15 +646,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) -- cgit v1.2.3-54-g00ecf