diff options
author | Chris Laplante <chris.laplante@agilent.com> | 2024-12-11 12:41:27 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-12-17 11:48:25 +0000 |
commit | 9d1b31d2542e50afe8d832588a4858054278e66c (patch) | |
tree | cddda097c6a8a297ae05afdafb64ee0be23ed171 /bitbake/lib/bblayers | |
parent | 2333609ac20698877cde5baa65e7540ca5d4fd65 (diff) | |
download | poky-9d1b31d2542e50afe8d832588a4858054278e66c.tar.gz |
bitbake: cooker: Make cooker 'skiplist' per-multiconfig/mc
Previously, the cooker skiplist was shared across multiconfigs
(including default ''). If you had a recipe that was incompatible with
several multiconfigs for different reasons, then the displayed reason
(i.e. the "ERROR: Nothing PROVIDES" and "* was skipped" messages) might
vary across invocations of bitbake. This was caused by the random order
in which recipes are parsed under different multiconfig contexts, with
each skip reason overwriting the previously assigned reason.
I hit this specificially when using COMPATIBLE_MACHINE, but
COMPATIBLE_HOST (or anything using bb.parse.SkipRecipe) would have done it too.
(Bitbake rev: c51f01a35ed9a928402eab0899598b5c59602eef)
Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bblayers')
-rw-r--r-- | bitbake/lib/bblayers/query.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bitbake/lib/bblayers/query.py b/bitbake/lib/bblayers/query.py index bfc18a7593..eb7cb465b4 100644 --- a/bitbake/lib/bblayers/query.py +++ b/bitbake/lib/bblayers/query.py | |||
@@ -142,10 +142,10 @@ skipped recipes will also be listed, with a " (skipped)" suffix. | |||
142 | # Ensure we list skipped recipes | 142 | # Ensure we list skipped recipes |
143 | # We are largely guessing about PN, PV and the preferred version here, | 143 | # We are largely guessing about PN, PV and the preferred version here, |
144 | # but we have no choice since skipped recipes are not fully parsed | 144 | # but we have no choice since skipped recipes are not fully parsed |
145 | skiplist = list(self.tinfoil.cooker.skiplist.keys()) | 145 | skiplist = list(self.tinfoil.cooker.skiplist_by_mc[mc].keys()) |
146 | mcspec = 'mc:%s:' % mc | 146 | |
147 | if mc: | 147 | if mc: |
148 | skiplist = [s[len(mcspec):] for s in skiplist if s.startswith(mcspec)] | 148 | skiplist = [s.removeprefix(f'mc:{mc}:') for s in skiplist] |
149 | 149 | ||
150 | for fn in skiplist: | 150 | for fn in skiplist: |
151 | recipe_parts = os.path.splitext(os.path.basename(fn))[0].split('_') | 151 | recipe_parts = os.path.splitext(os.path.basename(fn))[0].split('_') |
@@ -162,7 +162,7 @@ skipped recipes will also be listed, with a " (skipped)" suffix. | |||
162 | def print_item(f, pn, ver, layer, ispref): | 162 | def print_item(f, pn, ver, layer, ispref): |
163 | if not selected_layer or layer == selected_layer: | 163 | if not selected_layer or layer == selected_layer: |
164 | if not bare and f in skiplist: | 164 | if not bare and f in skiplist: |
165 | skipped = ' (skipped: %s)' % self.tinfoil.cooker.skiplist[f].skipreason | 165 | skipped = ' (skipped: %s)' % self.tinfoil.cooker.skiplist_by_mc[mc][f].skipreason |
166 | else: | 166 | else: |
167 | skipped = '' | 167 | skipped = '' |
168 | if show_filenames: | 168 | if show_filenames: |
@@ -301,7 +301,7 @@ Lists recipes with the bbappends that apply to them as subitems. | |||
301 | if self.show_appends_for_pn(pn, cooker_data, args.mc): | 301 | if self.show_appends_for_pn(pn, cooker_data, args.mc): |
302 | appends = True | 302 | appends = True |
303 | 303 | ||
304 | if not args.pnspec and self.show_appends_for_skipped(): | 304 | if not args.pnspec and self.show_appends_for_skipped(args.mc): |
305 | appends = True | 305 | appends = True |
306 | 306 | ||
307 | if not appends: | 307 | if not appends: |
@@ -317,9 +317,9 @@ Lists recipes with the bbappends that apply to them as subitems. | |||
317 | 317 | ||
318 | return self.show_appends_output(filenames, best_filename) | 318 | return self.show_appends_output(filenames, best_filename) |
319 | 319 | ||
320 | def show_appends_for_skipped(self): | 320 | def show_appends_for_skipped(self, mc): |
321 | filenames = [os.path.basename(f) | 321 | filenames = [os.path.basename(f) |
322 | for f in self.tinfoil.cooker.skiplist.keys()] | 322 | for f in self.tinfoil.cooker.skiplist_by_mc[mc].keys()] |
323 | return self.show_appends_output(filenames, None, " (skipped)") | 323 | return self.show_appends_output(filenames, None, " (skipped)") |
324 | 324 | ||
325 | def show_appends_output(self, filenames, best_filename, name_suffix = ''): | 325 | def show_appends_output(self, filenames, best_filename, name_suffix = ''): |