diff options
| author | Joshua Lock <josh@linux.intel.com> | 2011-06-30 23:02:50 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-01 17:17:35 +0100 |
| commit | 6769269bea2983a4036a535b3e679e13126318ed (patch) | |
| tree | 94fd52bd7c01ec9158b30cd991f180e06be7c30f /bitbake/lib/bb/cooker.py | |
| parent | a8afb3b353486f5396c0dc92eeed2fb74b89eda2 (diff) | |
| download | poky-6769269bea2983a4036a535b3e679e13126318ed.tar.gz | |
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>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 11 |
1 files 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: | |||
| 646 | else: | 646 | else: |
| 647 | shell.start( self ) | 647 | shell.start( self ) |
| 648 | 648 | ||
| 649 | def _findLayerConf(self): | 649 | def _findConfigFile(self, configfile): |
| 650 | path = os.getcwd() | 650 | path = os.getcwd() |
| 651 | while path != "/": | 651 | while path != "/": |
| 652 | bblayers = os.path.join(path, "conf", "bblayers.conf") | 652 | confpath = os.path.join(path, "conf", configfile) |
| 653 | if os.path.exists(bblayers): | 653 | if os.path.exists(confpath): |
| 654 | return bblayers | 654 | return confpath |
| 655 | 655 | ||
| 656 | path, _ = os.path.split(path) | 656 | path, _ = os.path.split(path) |
| 657 | 657 | ||
| 658 | def _findLayerConf(self): | ||
| 659 | return self._findConfigFile("bblayers.conf") | ||
| 660 | |||
| 658 | def parseConfigurationFiles(self, files): | 661 | def parseConfigurationFiles(self, files): |
| 659 | data = self.configuration.data | 662 | data = self.configuration.data |
| 660 | bb.parse.init_parser(data) | 663 | bb.parse.init_parser(data) |
