summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorChris Laplante <chris.laplante@agilent.com>2024-12-11 12:41:27 -0500
committerSteve Sakoman <steve@sakoman.com>2025-02-12 06:29:33 -0800
commitc621ccd93bdb4bd72a931426d963c583f6109364 (patch)
treec412332f8a71752b5d2fc15c626a6a215aa35176 /bitbake/lib/bb/cooker.py
parent6b2ad54a4381af1c14f6253b62fde6df0964bfe5 (diff)
downloadpoky-c621ccd93bdb4bd72a931426d963c583f6109364.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: a8578d12dfe5a3c92119bfee224595a392d6b0dd) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c51f01a35ed9a928402eab0899598b5c59602eef) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 582fc35f24..4aad408d48 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -134,7 +134,8 @@ class BBCooker:
134 self.baseconfig_valid = False 134 self.baseconfig_valid = False
135 self.parsecache_valid = False 135 self.parsecache_valid = False
136 self.eventlog = None 136 self.eventlog = None
137 self.skiplist = {} 137 # The skiplists, one per multiconfig
138 self.skiplist_by_mc = defaultdict(dict)
138 self.featureset = CookerFeatures() 139 self.featureset = CookerFeatures()
139 if featureSet: 140 if featureSet:
140 for f in featureSet: 141 for f in featureSet:
@@ -616,8 +617,8 @@ class BBCooker:
616 localdata = {} 617 localdata = {}
617 618
618 for mc in self.multiconfigs: 619 for mc in self.multiconfigs:
619 taskdata[mc] = bb.taskdata.TaskData(halt, skiplist=self.skiplist, allowincomplete=allowincomplete) 620 taskdata[mc] = bb.taskdata.TaskData(halt, skiplist=self.skiplist_by_mc[mc], allowincomplete=allowincomplete)
620 localdata[mc] = data.createCopy(self.databuilder.mcdata[mc]) 621 localdata[mc] = bb.data.createCopy(self.databuilder.mcdata[mc])
621 bb.data.expandKeys(localdata[mc]) 622 bb.data.expandKeys(localdata[mc])
622 623
623 current = 0 624 current = 0
@@ -937,7 +938,7 @@ class BBCooker:
937 for mc in self.multiconfigs: 938 for mc in self.multiconfigs:
938 # First get list of recipes, including skipped 939 # First get list of recipes, including skipped
939 recipefns = list(self.recipecaches[mc].pkg_fn.keys()) 940 recipefns = list(self.recipecaches[mc].pkg_fn.keys())
940 recipefns.extend(self.skiplist.keys()) 941 recipefns.extend(self.skiplist_by_mc[mc].keys())
941 942
942 # Work out list of bbappends that have been applied 943 # Work out list of bbappends that have been applied
943 applied_appends = [] 944 applied_appends = []
@@ -2362,7 +2363,7 @@ class CookerParser(object):
2362 for virtualfn, info_array in result: 2363 for virtualfn, info_array in result:
2363 if info_array[0].skipped: 2364 if info_array[0].skipped:
2364 self.skipped += 1 2365 self.skipped += 1
2365 self.cooker.skiplist[virtualfn] = SkippedPackage(info_array[0]) 2366 self.cooker.skiplist_by_mc[mc][virtualfn] = SkippedPackage(info_array[0])
2366 self.bb_caches[mc].add_info(virtualfn, info_array, self.cooker.recipecaches[mc], 2367 self.bb_caches[mc].add_info(virtualfn, info_array, self.cooker.recipecaches[mc],
2367 parsed=parsed, watcher = self.cooker.add_filewatch) 2368 parsed=parsed, watcher = self.cooker.add_filewatch)
2368 return True 2369 return True