summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/command.py
diff options
context:
space:
mode:
authorChris Laplante <chris.laplante@agilent.com>2025-01-07 16:54:03 -0500
committerSteve Sakoman <steve@sakoman.com>2025-01-24 07:59:38 -0800
commit7aa8128bf1744dc0dd4c68065d19e12c86443c46 (patch)
tree13a67d6420ee51cfbb759accbc5f6d745fcfa66a /bitbake/lib/bb/command.py
parentc1ed07ecde3eea6dee3f7f0c7862ca85858e840d (diff)
downloadpoky-7aa8128bf1744dc0dd4c68065d19e12c86443c46.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: 7dde14582bfd104c6da26e3f5ecf2ef37a1494ce) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
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 1fcb9bf14c..5e166fe45c 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -420,15 +420,30 @@ class CommandsSync:
420 return command.cooker.recipecaches[mc].pkg_dp 420 return command.cooker.recipecaches[mc].pkg_dp
421 getDefaultPreference.readonly = True 421 getDefaultPreference.readonly = True
422 422
423
423 def getSkippedRecipes(self, command, params): 424 def getSkippedRecipes(self, command, params):
425 """
426 Get the map of skipped recipes for the specified multiconfig/mc name (`params[0]`).
427
428 Invoked by `bb.tinfoil.Tinfoil.get_skipped_recipes`
429
430 :param command: Internally used parameter.
431 :param params: Parameter array. params[0] is multiconfig/mc name. If not given, then default mc '' is assumed.
432 :return: Dict whose keys are virtualfns and values are `bb.cooker.SkippedPackage`
433 """
434 try:
435 mc = params[0]
436 except IndexError:
437 mc = ''
438
424 # Return list sorted by reverse priority order 439 # Return list sorted by reverse priority order
425 import bb.cache 440 import bb.cache
426 def sortkey(x): 441 def sortkey(x):
427 vfn, _ = x 442 vfn, _ = x
428 realfn, _, mc = bb.cache.virtualfn2realfn(vfn) 443 realfn, _, item_mc = bb.cache.virtualfn2realfn(vfn)
429 return (-command.cooker.collections[mc].calc_bbfile_priority(realfn)[0], vfn) 444 return -command.cooker.collections[item_mc].calc_bbfile_priority(realfn)[0], vfn
430 445
431 skipdict = OrderedDict(sorted(command.cooker.skiplist.items(), key=sortkey)) 446 skipdict = OrderedDict(sorted(command.cooker.skiplist_by_mc[mc].items(), key=sortkey))
432 return list(skipdict.items()) 447 return list(skipdict.items())
433 getSkippedRecipes.readonly = True 448 getSkippedRecipes.readonly = True
434 449