bitbake-layers fixes
cover bitbake-layers fixes
The following changes (against Poky, but apply cleanly with -p2 against bitbake master) are available in the git repository at:
git://git.yoctoproject.org/poky-contrib paule/bblayers-fixes
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/bblayers-fixes
Paul Eggleton (3):
bitbake/cooker: minor refactor of parseConfiguration()
bitbake-layers: avoid full parse for show-layers subcommand
bitbake-layers: use parsable title for show-appends
bitbake/bin/bitbake-layers | 13 ++++++++----- bitbake/lib/bb/cooker.py | 16 ++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/3 bitbake/cooker: minor refactor of parseConfiguration()
All calls to parseConfiguration set self.status and call self.handleCollections() afterwards, so just do this inside parseConfiguration() itself.
--- bitbake/lib/bb/cooker.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
bitbake/lib/bb/cooker.py +6 -10
@@ -219,6 +219,12 @@ class BBCooker: nice = int(nice) - curnice buildlog.verbose("Renice to %s " % os.nice(nice)) + if self.status: + del self.status + self.status = bb.cache.CacheData(self.caches_array) + + self.handleCollections( self.configuration.data.getVar("BBFILE_COLLECTIONS", True) ) + def parseCommandLine(self): # Parse any commandline into actions self.commandlineAction = {'action':None, 'msg':None}
@@ -298,8 +304,6 @@ class BBCooker: # Parse the configuration here. We need to do it explicitly here since # this showEnvironment() code path doesn't use the cache self.parseConfiguration() - self.status = bb.cache.CacheData(self.caches_array) - self.handleCollections( self.configuration.data.getVar("BBFILE_COLLECTIONS", True) ) fn, cls = bb.cache.Cache.virtualfn2realfn(buildfile) fn = self.matchFile(fn)
@@ -1035,8 +1039,6 @@ class BBCooker: # Parse the configuration here. We need to do it explicitly here since # buildFile() doesn't use the cache self.parseConfiguration() - self.status = bb.cache.CacheData(self.caches_array) - self.handleCollections( self.configuration.data.getVar("BBFILE_COLLECTIONS", True) ) # If we are told to do the None task then query the default task if (task == None):
@@ -1186,18 +1188,12 @@ class BBCooker: if self.state != state.parsing: self.parseConfiguration () - if self.status: - del self.status - self.status = bb.cache.CacheData(self.caches_array) - ignore = self.configuration.data.getVar("ASSUME_PROVIDED", True) or "" self.status.ignored_dependencies = set(ignore.split()) for dep in self.configuration.extra_assume_provided: self.status.ignored_dependencies.add(dep) - self.handleCollections( self.configuration.data.getVar("BBFILE_COLLECTIONS", True) ) - (filelist, masked) = self.collect_bbfiles() self.configuration.data.renameVar("__depends", "__base_depends")
Signature · 1 line
1.7.9.5
PATCH 2/3 bitbake-layers: avoid full parse for show-layers subcommand
In reply to Paul EggletonWe don't actually need to parse all recipes just to show the configured layers, so just parse the configuration instead.
--- bitbake/bin/bitbake-layers | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
bitbake/bin/bitbake-layers +7 -4
@@ -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:
Signature · 1 line
1.7.9.5
PATCH 3/3 bitbake-layers: use parsable title for show-appends
In reply to Paul EggletonPrint title text surrounded by === as we do with other subcommands so that you can filter it out in scripts. (You will also want to filter out lines starting with "WARNING:" if you just want the list).
--- bitbake/bin/bitbake-layers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/bin/bitbake-layers +1 -1
@@ -521,7 +521,7 @@ Recipes are listed with the bbappends that apply to them as subitems. logger.plain('No append files found') return - logger.plain('State of append files:') + logger.plain('=== Appended recipes ===') pnlist = list(self.cooker_data.pkg_pn.keys()) pnlist.sort()
Signature · 1 line
1.7.9.5
Quoted 10 lines · Paul Eggleton
The following changes (against Poky, but apply cleanly with -p2 against bitbake master) are available in the git repository at:
git://git.yoctoproject.org/poky-contribpaule/bblayers-fixes
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/bblayers-fixesPaul Eggleton (3):
bitbake/cooker: minor refactor ofparseConfiguration()
bitbake-layers: avoid full parse for show-layers subcommand
bitbake-layers: use parsable title for show-appends
Thanks, merged to master.
Cheers,
Richard