summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2017-11-01 20:01:08 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-07 13:32:13 +0000
commitbd87dd5a8d3e7965c44406187a39caaee3277285 (patch)
tree87fe411d1f51c04646150f4324f1cc5410bd5397 /bitbake
parentd57e29f23516113375d6bc0c146335764de3e736 (diff)
downloadpoky-bd87dd5a8d3e7965c44406187a39caaee3277285.tar.gz
bitbake: bitbake-layers: Add support for multiple recipes at once
bitbake-layers show-recipes and show-appends supported listing all recipes or one recipe. Adjust the system to permit specifying more then one recipe. Also update show-appends to match the --help description and support file style wildcards for selecting the recipe to display. (Bitbake rev: d72c1a91c261d78004d80e2fe5634f0e5f1ef947) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bblayers/query.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/bitbake/lib/bblayers/query.py b/bitbake/lib/bblayers/query.py
index bef3af31a3..efd22cb456 100644
--- a/bitbake/lib/bblayers/query.py
+++ b/bitbake/lib/bblayers/query.py
@@ -161,7 +161,12 @@ skipped recipes will also be listed, with a " (skipped)" suffix.
161 items_listed = False 161 items_listed = False
162 for p in sorted(pkg_pn): 162 for p in sorted(pkg_pn):
163 if pnspec: 163 if pnspec:
164 if not fnmatch.fnmatch(p, pnspec): 164 found=False
165 for pnm in pnspec:
166 if fnmatch.fnmatch(p, pnm):
167 found=True
168 break
169 if not found:
165 continue 170 continue
166 171
167 if len(allproviders[p]) > 1 or not show_multi_provider_only: 172 if len(allproviders[p]) > 1 or not show_multi_provider_only:
@@ -251,8 +256,14 @@ Lists recipes with the bbappends that apply to them as subitems.
251 pnlist.sort() 256 pnlist.sort()
252 appends = False 257 appends = False
253 for pn in pnlist: 258 for pn in pnlist:
254 if args.pnspec and pn != args.pnspec: 259 if args.pnspec:
255 continue 260 found=False
261 for pnm in args.pnspec:
262 if fnmatch.fnmatch(pn, pnm):
263 found=True
264 break
265 if not found:
266 continue
256 267
257 if self.show_appends_for_pn(pn): 268 if self.show_appends_for_pn(pn):
258 appends = True 269 appends = True
@@ -480,10 +491,10 @@ NOTE: .bbappend files can impact the dependencies.
480 parser_show_recipes.add_argument('-f', '--filenames', help='instead of the default formatting, list filenames of higher priority recipes with the ones they overlay indented underneath', action='store_true') 491 parser_show_recipes.add_argument('-f', '--filenames', help='instead of the default formatting, list filenames of higher priority recipes with the ones they overlay indented underneath', action='store_true')
481 parser_show_recipes.add_argument('-m', '--multiple', help='only list where multiple recipes (in the same layer or different layers) exist for the same recipe name', action='store_true') 492 parser_show_recipes.add_argument('-m', '--multiple', help='only list where multiple recipes (in the same layer or different layers) exist for the same recipe name', action='store_true')
482 parser_show_recipes.add_argument('-i', '--inherits', help='only list recipes that inherit the named class', metavar='CLASS', default='') 493 parser_show_recipes.add_argument('-i', '--inherits', help='only list recipes that inherit the named class', metavar='CLASS', default='')
483 parser_show_recipes.add_argument('pnspec', nargs='?', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)') 494 parser_show_recipes.add_argument('pnspec', nargs='*', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)')
484 495
485 parser_show_appends = self.add_command(sp, 'show-appends', self.do_show_appends) 496 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)') 497 parser_show_appends.add_argument('pnspec', nargs='*', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)')
487 498
488 parser_show_cross_depends = self.add_command(sp, 'show-cross-depends', self.do_show_cross_depends) 499 parser_show_cross_depends = self.add_command(sp, 'show-cross-depends', self.do_show_cross_depends)
489 parser_show_cross_depends.add_argument('-f', '--filenames', help='show full file path', action='store_true') 500 parser_show_cross_depends.add_argument('-f', '--filenames', help='show full file path', action='store_true')