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:
parent
a8afb3b353
commit
6769269bea
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue