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:45 +0100 |
commit | f4dcbf114554c829467623b5587314d16ebdf3eb (patch) | |
tree | 637705c57affb43f2af8f7172eb836c5241b46bc | |
parent | fa2724069ea7028939d816cb5ccd0e7c1bed09a1 (diff) | |
download | bitbake-contrib-f4dcbf114554c829467623b5587314d16ebdf3eb.tar.gz |
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)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bblayers/query.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/bblayers/query.py b/lib/bblayers/query.py index bec76db98..bfc18a759 100644 --- a/lib/bblayers/query.py +++ b/lib/bblayers/query.py @@ -282,7 +282,10 @@ Lists recipes with the bbappends that apply to them as subitems. else: logger.plain('=== Appended recipes ===') - pnlist = list(self.tinfoil.cooker_data.pkg_pn.keys()) + + cooker_data = self.tinfoil.cooker.recipecaches[args.mc] + + pnlist = list(cooker_data.pkg_pn.keys()) pnlist.sort() appends = False for pn in pnlist: @@ -295,7 +298,7 @@ Lists recipes with the bbappends that apply to them as subitems. if not found: continue - if self.show_appends_for_pn(pn): + if self.show_appends_for_pn(pn, cooker_data, args.mc): appends = True 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. if not appends: logger.plain('No append files found') - def show_appends_for_pn(self, pn): - filenames = self.tinfoil.cooker_data.pkg_pn[pn] + def show_appends_for_pn(self, pn, cooker_data, mc): + filenames = cooker_data.pkg_pn[pn] + if mc: + pn = "mc:%s:%s" % (mc, pn) best = self.tinfoil.find_best_provider(pn) best_filename = os.path.basename(best[3]) @@ -530,6 +535,7 @@ NOTE: .bbappend files can impact the dependencies. 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_appends.add_argument('--mc', help='use specified multiconfig', default='') 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') |