summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/command.py
diff options
context:
space:
mode:
authorChris Laplante <chris.laplante@agilent.com>2024-12-11 12:41:27 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-12-17 11:48:25 +0000
commit9d1b31d2542e50afe8d832588a4858054278e66c (patch)
treecddda097c6a8a297ae05afdafb64ee0be23ed171 /bitbake/lib/bb/command.py
parent2333609ac20698877cde5baa65e7540ca5d4fd65 (diff)
downloadpoky-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/bb/command.py')
-rw-r--r--bitbake/lib/bb/command.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 7944faf981..baa7cbade1 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -421,15 +421,30 @@ class CommandsSync:
421 return command.cooker.recipecaches[mc].pkg_dp 421 return command.cooker.recipecaches[mc].pkg_dp
422 getDefaultPreference.readonly = True 422 getDefaultPreference.readonly = True
423 423
424
424 def getSkippedRecipes(self, command, params): 425 def getSkippedRecipes(self, command, params):
426 """
427 Get the map of skipped recipes for the specified multiconfig/mc name (`params[0]`).
428
429 Invoked by `bb.tinfoil.Tinfoil.get_skipped_recipes`
430
431 :param command: Internally used parameter.
432 :param params: Parameter array. params[0] is multiconfig/mc name. If not given, then default mc '' is assumed.
433 :return: Dict whose keys are virtualfns and values are `bb.cooker.SkippedPackage`
434 """
435 try:
436 mc = params[0]
437 except IndexError:
438 mc = ''
439
425 # Return list sorted by reverse priority order 440 # Return list sorted by reverse priority order
426 import bb.cache 441 import bb.cache
427 def sortkey(x): 442 def sortkey(x):
428 vfn, _ = x 443 vfn, _ = x
429 realfn, _, mc = bb.cache.virtualfn2realfn(vfn) 444 realfn, _, item_mc = bb.cache.virtualfn2realfn(vfn)
430 return (-command.cooker.collections[mc].calc_bbfile_priority(realfn)[0], vfn) 445 return -command.cooker.collections[item_mc].calc_bbfile_priority(realfn)[0], vfn
431 446
432 skipdict = OrderedDict(sorted(command.cooker.skiplist.items(), key=sortkey)) 447 skipdict = OrderedDict(sorted(command.cooker.skiplist_by_mc[mc].items(), key=sortkey))
433 return list(skipdict.items()) 448 return list(skipdict.items())
434 getSkippedRecipes.readonly = True 449 getSkippedRecipes.readonly = True
435 450