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:59:56 +0100 |
commit | 5d09fb034625114a82eb198f5b69da6ed230cb29 (patch) | |
tree | f6af8447b5cc13b9a48c180042a34ba5f9e3df20 /bitbake | |
parent | a46fac74c3372cfcd1cb639c058bd416d0ea3b64 (diff) | |
download | poky-5d09fb034625114a82eb198f5b69da6ed230cb29.tar.gz |
bitbake: 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.
(Bitbake rev: 406477cbae066b6379873e266cb79801e545a61c)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/bin/bitbake-layers | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers index 1dacc258b4..6d18d9455b 100755 --- a/bitbake/bin/bitbake-layers +++ b/bitbake/bin/bitbake-layers | |||
@@ -86,9 +86,13 @@ class Commands(cmd.Cmd): | |||
86 | self.cooker_data = self.cooker.status | 86 | self.cooker_data = self.cooker.status |
87 | self.cooker_data.appends = self.cooker.appendlist | 87 | self.cooker_data.appends = self.cooker.appendlist |
88 | 88 | ||
89 | def check_prepare_cooker(self): | 89 | def check_prepare_cooker(self, config_only = False): |
90 | if not self.cooker_data: | 90 | if not self.cooker_data: |
91 | self.prepare_cooker() | 91 | if config_only: |
92 | self.cooker.parseConfiguration() | ||
93 | self.cooker_data = self.cooker.status | ||
94 | else: | ||
95 | self.prepare_cooker() | ||
92 | 96 | ||
93 | def default(self, line): | 97 | def default(self, line): |
94 | """Handle unrecognised commands""" | 98 | """Handle unrecognised commands""" |
@@ -113,8 +117,7 @@ class Commands(cmd.Cmd): | |||
113 | 117 | ||
114 | def do_show_layers(self, args): | 118 | def do_show_layers(self, args): |
115 | """show current configured layers""" | 119 | """show current configured layers""" |
116 | self.check_prepare_cooker() | 120 | self.check_prepare_cooker(config_only = True) |
117 | logger.plain('') | ||
118 | logger.plain("%s %s %s" % ("layer".ljust(20), "path".ljust(40), "priority")) | 121 | logger.plain("%s %s %s" % ("layer".ljust(20), "path".ljust(40), "priority")) |
119 | logger.plain('=' * 74) | 122 | logger.plain('=' * 74) |
120 | for layerdir in self.bblayers: | 123 | for layerdir in self.bblayers: |