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>
This commit is contained in:
parent
a46fac74c3
commit
5d09fb0346
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue