diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2023-08-15 10:11:39 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-08-16 09:43:49 +0100 |
commit | fb51e196a978d452e6a14a8343832659da97fdc7 (patch) | |
tree | 0453b2a29e24e059dfbb1fd5f5204a98b3fcf266 /bitbake/lib/bblayers/query.py | |
parent | f9dff104bd6c1b401637918a12decdbf4e02ff93 (diff) | |
download | poky-fb51e196a978d452e6a14a8343832659da97fdc7.tar.gz |
bitbake: bblayers/query: Add multiconfig support to `show-appends`
Adds a --mc argument to `bitbake-layers show-appends` so that users can
filter appends for a specific multiconfig (instead of always showing the
default configuration)
(Bitbake rev: f4dcbf114554c829467623b5587314d16ebdf3eb)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bblayers/query.py')
-rw-r--r-- | bitbake/lib/bblayers/query.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bitbake/lib/bblayers/query.py b/bitbake/lib/bblayers/query.py index bec76db98a..bfc18a7593 100644 --- a/bitbake/lib/bblayers/query.py +++ b/bitbake/lib/bblayers/query.py | |||
@@ -282,7 +282,10 @@ Lists recipes with the bbappends that apply to them as subitems. | |||
282 | else: | 282 | else: |
283 | logger.plain('=== Appended recipes ===') | 283 | logger.plain('=== Appended recipes ===') |
284 | 284 | ||
285 | pnlist = list(self.tinfoil.cooker_data.pkg_pn.keys()) | 285 | |
286 | cooker_data = self.tinfoil.cooker.recipecaches[args.mc] | ||
287 | |||
288 | pnlist = list(cooker_data.pkg_pn.keys()) | ||
286 | pnlist.sort() | 289 | pnlist.sort() |
287 | appends = False | 290 | appends = False |
288 | for pn in pnlist: | 291 | for pn in pnlist: |
@@ -295,7 +298,7 @@ Lists recipes with the bbappends that apply to them as subitems. | |||
295 | if not found: | 298 | if not found: |
296 | continue | 299 | continue |
297 | 300 | ||
298 | if self.show_appends_for_pn(pn): | 301 | if self.show_appends_for_pn(pn, cooker_data, args.mc): |
299 | appends = True | 302 | appends = True |
300 | 303 | ||
301 | if not args.pnspec and self.show_appends_for_skipped(): | 304 | if not args.pnspec and self.show_appends_for_skipped(): |
@@ -304,8 +307,10 @@ Lists recipes with the bbappends that apply to them as subitems. | |||
304 | if not appends: | 307 | if not appends: |
305 | logger.plain('No append files found') | 308 | logger.plain('No append files found') |
306 | 309 | ||
307 | def show_appends_for_pn(self, pn): | 310 | def show_appends_for_pn(self, pn, cooker_data, mc): |
308 | filenames = self.tinfoil.cooker_data.pkg_pn[pn] | 311 | filenames = cooker_data.pkg_pn[pn] |
312 | if mc: | ||
313 | pn = "mc:%s:%s" % (mc, pn) | ||
309 | 314 | ||
310 | best = self.tinfoil.find_best_provider(pn) | 315 | best = self.tinfoil.find_best_provider(pn) |
311 | best_filename = os.path.basename(best[3]) | 316 | best_filename = os.path.basename(best[3]) |
@@ -530,6 +535,7 @@ NOTE: .bbappend files can impact the dependencies. | |||
530 | 535 | ||
531 | parser_show_appends = self.add_command(sp, 'show-appends', self.do_show_appends) | 536 | parser_show_appends = self.add_command(sp, 'show-appends', self.do_show_appends) |
532 | parser_show_appends.add_argument('pnspec', nargs='*', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)') | 537 | parser_show_appends.add_argument('pnspec', nargs='*', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)') |
538 | parser_show_appends.add_argument('--mc', help='use specified multiconfig', default='') | ||
533 | 539 | ||
534 | parser_show_cross_depends = self.add_command(sp, 'show-cross-depends', self.do_show_cross_depends) | 540 | parser_show_cross_depends = self.add_command(sp, 'show-cross-depends', self.do_show_cross_depends) |
535 | parser_show_cross_depends.add_argument('-f', '--filenames', help='show full file path', action='store_true') | 541 | parser_show_cross_depends.add_argument('-f', '--filenames', help='show full file path', action='store_true') |