bitbake: bitbake-layers: show-appends: add optional argument to limit package list
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 (Bitbake rev: 43668657a8a679acc957e26e6fd8f47ab4cb3da8) Signed-off-by: Matthew McClintock <msm-oss@mcclintock.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
ab7fef0ebc
commit
a5a51304d1
|
@ -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.
|
Lists recipes with the bbappends that apply to them as subitems.
|
||||||
"""
|
"""
|
||||||
|
if args.pnspec:
|
||||||
logger.plain('=== Appended recipes ===')
|
logger.plain('=== Matched appended recipes ===')
|
||||||
|
else:
|
||||||
|
logger.plain('=== Appended recipes ===')
|
||||||
|
|
||||||
pnlist = list(self.tinfoil.cooker_data.pkg_pn.keys())
|
pnlist = list(self.tinfoil.cooker_data.pkg_pn.keys())
|
||||||
pnlist.sort()
|
pnlist.sort()
|
||||||
appends = False
|
appends = False
|
||||||
for pn in pnlist:
|
for pn in pnlist:
|
||||||
|
if args.pnspec and pn != args.pnspec:
|
||||||
|
continue
|
||||||
|
|
||||||
if self.show_appends_for_pn(pn):
|
if self.show_appends_for_pn(pn):
|
||||||
appends = True
|
appends = True
|
||||||
|
|
||||||
if self.show_appends_for_skipped():
|
if not args.pnspec and self.show_appends_for_skipped():
|
||||||
appends = True
|
appends = True
|
||||||
|
|
||||||
if not appends:
|
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('-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)')
|
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 = 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')
|
parser_show_cross_depends.add_argument('-f', '--filenames', help='show full file path', action='store_true')
|
||||||
|
|
Loading…
Reference in New Issue