* [PATCH] bitbake-layers: show-appends: add optional argument to limit package list
@ 2017-01-12 0:44 Matthew McClintock
2017-01-23 8:45 ` Paul Eggleton
0 siblings, 1 reply; 2+ messages in thread
From: Matthew McClintock @ 2017-01-12 0:44 UTC (permalink / raw)
To: bitbake-devel
Add ability to limit output per package:
$ bitbake-layers show-appends m4
=== Matched appended recipes ===
m4_1.4.17.bb:
/home/mattsm/git/openembedded-core/meta-selftest/recipes-test/m4/m4_1.4.17.bbappend
Useful for writing tools to process the output, and debugging
bbappends for specific packages
Signed-off-by: Matthew McClintock <msm-oss@mcclintock.net>
---
lib/bblayers/query.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/lib/bblayers/query.py b/lib/bblayers/query.py
index 5def717..bef3af3 100644
--- a/lib/bblayers/query.py
+++ b/lib/bblayers/query.py
@@ -242,17 +242,22 @@ skipped recipes will also be listed, with a " (skipped)" suffix.
Lists recipes with the bbappends that apply to them as subitems.
"""
-
- logger.plain('=== Appended recipes ===')
+ if args.pnspec:
+ logger.plain('=== Matched appended recipes ===')
+ else:
+ logger.plain('=== Appended recipes ===')
pnlist = list(self.tinfoil.cooker_data.pkg_pn.keys())
pnlist.sort()
appends = False
for pn in pnlist:
+ if args.pnspec and pn != args.pnspec:
+ continue
+
if self.show_appends_for_pn(pn):
appends = True
- if self.show_appends_for_skipped():
+ if not args.pnspec and self.show_appends_for_skipped():
appends = True
if not appends:
@@ -477,7 +482,8 @@ NOTE: .bbappend files can impact the dependencies.
parser_show_recipes.add_argument('-i', '--inherits', help='only list recipes that inherit the named class', metavar='CLASS', default='')
parser_show_recipes.add_argument('pnspec', nargs='?', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)')
- self.add_command(sp, 'show-appends', self.do_show_appends)
+ parser_show_appends = self.add_command(sp, 'show-appends', self.do_show_appends)
+ parser_show_appends.add_argument('pnspec', nargs='?', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)')
parser_show_cross_depends = self.add_command(sp, 'show-cross-depends', self.do_show_cross_depends)
parser_show_cross_depends.add_argument('-f', '--filenames', help='show full file path', action='store_true')
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bitbake-layers: show-appends: add optional argument to limit package list
2017-01-12 0:44 [PATCH] bitbake-layers: show-appends: add optional argument to limit package list Matthew McClintock
@ 2017-01-23 8:45 ` Paul Eggleton
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggleton @ 2017-01-23 8:45 UTC (permalink / raw)
To: bitbake-devel
On Wed, 11 Jan 2017 18:44:18 Matthew McClintock wrote:
> Add ability to limit output per package:
>
> $ bitbake-layers show-appends m4
> === Matched appended recipes ===
> m4_1.4.17.bb:
>
> /home/mattsm/git/openembedded-core/meta-selftest/recipes-test/m4/m4_1.4.17.
> bbappend
>
> Useful for writing tools to process the output, and debugging
> bbappends for specific packages
>
> Signed-off-by: Matthew McClintock <msm-oss@mcclintock.net>
> ---
> lib/bblayers/query.py | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/lib/bblayers/query.py b/lib/bblayers/query.py
> index 5def717..bef3af3 100644
> --- a/lib/bblayers/query.py
> +++ b/lib/bblayers/query.py
> @@ -242,17 +242,22 @@ skipped recipes will also be listed, with a "
> (skipped)" suffix.
>
> Lists recipes with the bbappends that apply to them as subitems.
> """
> -
> - logger.plain('=== Appended recipes ===')
> + if args.pnspec:
> + logger.plain('=== Matched appended recipes ===')
> + else:
> + logger.plain('=== Appended recipes ===')
>
> pnlist = list(self.tinfoil.cooker_data.pkg_pn.keys())
> pnlist.sort()
> appends = False
> for pn in pnlist:
> + if args.pnspec and pn != args.pnspec:
> + continue
> +
> if self.show_appends_for_pn(pn):
> appends = True
>
> - if self.show_appends_for_skipped():
> + if not args.pnspec and self.show_appends_for_skipped():
> appends = True
>
> if not appends:
> @@ -477,7 +482,8 @@ NOTE: .bbappend files can impact the dependencies.
> parser_show_recipes.add_argument('-i', '--inherits', help='only
> list recipes that inherit the named class', metavar='CLASS', default='')
> parser_show_recipes.add_argument('pnspec', nargs='?', help='optional recipe
> name specification (wildcards allowed, enclose in quotes to avoid shell
> expansion)')
>
> - self.add_command(sp, 'show-appends', self.do_show_appends)
> + parser_show_appends = self.add_command(sp, 'show-appends',
> self.do_show_appends) + parser_show_appends.add_argument('pnspec',
> nargs='?', help='optional recipe name specification (wildcards allowed,
> enclose in quotes to avoid shell expansion)')
>
> parser_show_cross_depends = self.add_command(sp,
> 'show-cross-depends', self.do_show_cross_depends)
> parser_show_cross_depends.add_argument('-f', '--filenames', help='show full
> file path', action='store_true')
Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-23 8:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-12 0:44 [PATCH] bitbake-layers: show-appends: add optional argument to limit package list Matthew McClintock
2017-01-23 8:45 ` Paul Eggleton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.