diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-07-22 17:03:55 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-25 12:54:17 +0100 |
commit | 27edc7c1a906e38376054ad2a362ae213a45ba1b (patch) | |
tree | 2475709822cf65f166a14aede3b7171572ef6d33 /bitbake/bin | |
parent | bc4aefff9867d3a0fb502f99e086337561ee8a2f (diff) | |
download | ast2050-yocto-poky-27edc7c1a906e38376054ad2a362ae213a45ba1b.zip ast2050-yocto-poky-27edc7c1a906e38376054ad2a362ae213a45ba1b.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.
(Bitbake rev: 86adaca6ce959ad5e908c394625bc9880f3c0216)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-x | bitbake/bin/bitbake-layers | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers index 1c48c8c..56253f5 100755 --- a/bitbake/bin/bitbake-layers +++ b/bitbake/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 |