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 <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Lock 2011-06-30 23:02:50 -07:00 committed by Richard Purdie
parent a8afb3b353
commit 6769269bea
1 changed files with 7 additions and 4 deletions

View File

@ -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)