diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-08-21 18:11:46 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-22 13:47:39 +0100 |
commit | 406477cbae066b6379873e266cb79801e545a61c (patch) | |
tree | 763b4f4fad222c6fc8df65297a2220e42d9bfbec /bin/bitbake-layers | |
parent | 3c2322d8a6ce15e20adb07a61aa321d884a9bcca (diff) | |
download | bitbake-contrib-406477cbae066b6379873e266cb79801e545a61c.tar.gz |
bitbake-layers: avoid full parse for show-layers subcommand
We don't actually need to parse all recipes just to show the configured
layers, so just parse the configuration instead.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin/bitbake-layers')
-rwxr-xr-x | bin/bitbake-layers | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/bitbake-layers b/bin/bitbake-layers index 1dacc258b..6d18d9455 100755 --- a/bin/bitbake-layers +++ b/bin/bitbake-layers @@ -86,9 +86,13 @@ class Commands(cmd.Cmd): self.cooker_data = self.cooker.status self.cooker_data.appends = self.cooker.appendlist - def check_prepare_cooker(self): + def check_prepare_cooker(self, config_only = False): if not self.cooker_data: - self.prepare_cooker() + if config_only: + self.cooker.parseConfiguration() + self.cooker_data = self.cooker.status + else: + self.prepare_cooker() def default(self, line): """Handle unrecognised commands""" @@ -113,8 +117,7 @@ class Commands(cmd.Cmd): def do_show_layers(self, args): """show current configured layers""" - self.check_prepare_cooker() - logger.plain('') + self.check_prepare_cooker(config_only = True) logger.plain("%s %s %s" % ("layer".ljust(20), "path".ljust(40), "priority")) logger.plain('=' * 74) for layerdir in self.bblayers: |