summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bblayers
diff options
context:
space:
mode:
authorMatthew McClintock <msm-oss@mcclintock.net>2017-01-12 00:44:18 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 22:38:49 (GMT)
commita5a51304d15d09213042bfe6a2f9976c8854f1af (patch)
tree4f6526b623d1f152178e8a338d42c04072d1a949 /bitbake/lib/bblayers
parentab7fef0ebc568142aa98f0bb1603dd8ba0b1f6e8 (diff)
downloadpoky-a5a51304d15d09213042bfe6a2f9976c8854f1af.tar.gz
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>
Diffstat (limited to 'bitbake/lib/bblayers')
-rw-r--r--bitbake/lib/bblayers/query.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/bitbake/lib/bblayers/query.py b/bitbake/lib/bblayers/query.py
index 5def717..bef3af3 100644
--- a/bitbake/lib/bblayers/query.py
+++ b/bitbake/lib/bblayers/query.py
@@ -242,17 +242,22 @@ skipped recipes will also be listed, with a " (skipped)" suffix.
242 242
243Lists recipes with the bbappends that apply to them as subitems. 243Lists recipes with the bbappends that apply to them as subitems.
244""" 244"""
245 245 if args.pnspec:
246 logger.plain('=== Appended recipes ===') 246 logger.plain('=== Matched appended recipes ===')
247 else:
248 logger.plain('=== Appended recipes ===')
247 249
248 pnlist = list(self.tinfoil.cooker_data.pkg_pn.keys()) 250 pnlist = list(self.tinfoil.cooker_data.pkg_pn.keys())
249 pnlist.sort() 251 pnlist.sort()
250 appends = False 252 appends = False
251 for pn in pnlist: 253 for pn in pnlist:
254 if args.pnspec and pn != args.pnspec:
255 continue
256
252 if self.show_appends_for_pn(pn): 257 if self.show_appends_for_pn(pn):
253 appends = True 258 appends = True
254 259
255 if self.show_appends_for_skipped(): 260 if not args.pnspec and self.show_appends_for_skipped():
256 appends = True 261 appends = True
257 262
258 if not appends: 263 if not appends:
@@ -477,7 +482,8 @@ NOTE: .bbappend files can impact the dependencies.
477 parser_show_recipes.add_argument('-i', '--inherits', help='only list recipes that inherit the named class', metavar='CLASS', default='') 482 parser_show_recipes.add_argument('-i', '--inherits', help='only list recipes that inherit the named class', metavar='CLASS', default='')
478 parser_show_recipes.add_argument('pnspec', nargs='?', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)') 483 parser_show_recipes.add_argument('pnspec', nargs='?', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)')
479 484
480 self.add_command(sp, 'show-appends', self.do_show_appends) 485 parser_show_appends = self.add_command(sp, 'show-appends', self.do_show_appends)
486 parser_show_appends.add_argument('pnspec', nargs='?', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)')
481 487
482 parser_show_cross_depends = self.add_command(sp, 'show-cross-depends', self.do_show_cross_depends) 488 parser_show_cross_depends = self.add_command(sp, 'show-cross-depends', self.do_show_cross_depends)
483 parser_show_cross_depends.add_argument('-f', '--filenames', help='show full file path', action='store_true') 489 parser_show_cross_depends.add_argument('-f', '--filenames', help='show full file path', action='store_true')