* [PATCH 1/3] bitbake/cooker: minor refactor of parseConfiguration()
2012-08-21 17:11 [PATCH 0/3] bitbake-layers fixes Paul Eggleton
@ 2012-08-21 17:11 ` Paul Eggleton
2012-08-21 17:11 ` [PATCH 2/3] bitbake-layers: avoid full parse for show-layers subcommand Paul Eggleton
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2012-08-21 17:11 UTC (permalink / raw)
To: bitbake-devel
All calls to parseConfiguration set self.status and call
self.handleCollections() afterwards, so just do this inside
parseConfiguration() itself.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
bitbake/lib/bb/cooker.py | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 23fffc9..1737e54 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -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")
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/3] bitbake-layers: avoid full parse for show-layers subcommand
2012-08-21 17:11 [PATCH 0/3] bitbake-layers fixes Paul Eggleton
2012-08-21 17:11 ` [PATCH 1/3] bitbake/cooker: minor refactor of parseConfiguration() Paul Eggleton
@ 2012-08-21 17:11 ` Paul Eggleton
2012-08-21 17:11 ` [PATCH 3/3] bitbake-layers: use parsable title for show-appends Paul Eggleton
2012-08-22 12:55 ` [PATCH 0/3] bitbake-layers fixes Richard Purdie
3 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2012-08-21 17:11 UTC (permalink / raw)
To: bitbake-devel
We don't actually need to parse all recipes just to show the configured
layers, so just parse the configuration instead.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
bitbake/bin/bitbake-layers | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 1dacc25..6d18d94 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -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:
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/3] bitbake-layers: use parsable title for show-appends
2012-08-21 17:11 [PATCH 0/3] bitbake-layers fixes Paul Eggleton
2012-08-21 17:11 ` [PATCH 1/3] bitbake/cooker: minor refactor of parseConfiguration() Paul Eggleton
2012-08-21 17:11 ` [PATCH 2/3] bitbake-layers: avoid full parse for show-layers subcommand Paul Eggleton
@ 2012-08-21 17:11 ` Paul Eggleton
2012-08-22 12:55 ` [PATCH 0/3] bitbake-layers fixes Richard Purdie
3 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2012-08-21 17:11 UTC (permalink / raw)
To: bitbake-devel
Print 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).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
bitbake/bin/bitbake-layers | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 6d18d94..f473711 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -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()
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 0/3] bitbake-layers fixes
2012-08-21 17:11 [PATCH 0/3] bitbake-layers fixes Paul Eggleton
` (2 preceding siblings ...)
2012-08-21 17:11 ` [PATCH 3/3] bitbake-layers: use parsable title for show-appends Paul Eggleton
@ 2012-08-22 12:55 ` Richard Purdie
3 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2012-08-22 12:55 UTC (permalink / raw)
To: Paul Eggleton; +Cc: bitbake-devel
On Tue, 2012-08-21 at 18:11 +0100, Paul Eggleton wrote:
> 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
Thanks, merged to master.
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread