aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-07-22 17:03:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-25 12:48:40 +0100
commit86adaca6ce959ad5e908c394625bc9880f3c0216 (patch)
tree0686334fc3f50bfe0ef2dd73657b6bc19944486b /bin
parent8ba4d0e98401cdb808f727703913ad8ba87f8e71 (diff)
downloadbitbake-86adaca6ce959ad5e908c394625bc9880f3c0216.tar.gz
bitbake-layers: check for errors before parsing
Don't always parse on initialisation - instead check for errors and then parse when we know we need to. Avoids keeping the user waiting. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bitbake-layers10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/bitbake-layers b/bin/bitbake-layers
index 1c48c8c92..56253f5d2 100755
--- a/bin/bitbake-layers
+++ b/bin/bitbake-layers
@@ -48,7 +48,7 @@ class Commands(cmd.Cmd):
self.register_idle_function)
self.config_data = self.cooker.configuration.data
bb.providers.logger.setLevel(logging.ERROR)
- self.prepare_cooker()
+ self.cooker_data = None
def register_idle_function(self, function, data):
pass
@@ -71,10 +71,16 @@ class Commands(cmd.Cmd):
self.cooker_data = self.cooker.status
self.cooker_data.appends = self.cooker.appendlist
+ def check_prepare_cooker(self):
+ if not self.cooker_data:
+ self.prepare_cooker()
+
def do_show_layers(self, args):
+ self.check_prepare_cooker()
logger.info(str(self.config_data.getVar('BBLAYERS', True)))
def do_show_overlayed(self, args):
+ self.check_prepare_cooker()
if self.cooker.overlayed:
logger.info('Overlayed recipes:')
for f in self.cooker.overlayed.iterkeys():
@@ -94,6 +100,7 @@ class Commands(cmd.Cmd):
logger.error('Directory %s exists and is non-empty, please clear it out first' % arglist[0])
return
+ self.check_prepare_cooker()
layers = (self.config_data.getVar('BBLAYERS', True) or "").split()
for layer in layers:
overlayed = []
@@ -143,6 +150,7 @@ class Commands(cmd.Cmd):
recipefile.writelines(appendfile.readlines())
def do_show_appends(self, args):
+ self.check_prepare_cooker()
if not self.cooker_data.appends:
logger.info('No append files found')
return