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/bb/cooker.py | |
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/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index ceaaac11ee..5b885cddd7 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -133,7 +133,8 @@ class BBCooker: | |||
133 | self.baseconfig_valid = False | 133 | self.baseconfig_valid = False |
134 | self.parsecache_valid = False | 134 | self.parsecache_valid = False |
135 | self.eventlog = None | 135 | self.eventlog = None |
136 | self.skiplist = {} | 136 | # The skiplists, one per multiconfig |
137 | self.skiplist_by_mc = defaultdict(dict) | ||
137 | self.featureset = CookerFeatures() | 138 | self.featureset = CookerFeatures() |
138 | if featureSet: | 139 | if featureSet: |
139 | for f in featureSet: | 140 | for f in featureSet: |
@@ -614,8 +615,8 @@ class BBCooker: | |||
614 | localdata = {} | 615 | localdata = {} |
615 | 616 | ||
616 | for mc in self.multiconfigs: | 617 | for mc in self.multiconfigs: |
617 | taskdata[mc] = bb.taskdata.TaskData(halt, skiplist=self.skiplist, allowincomplete=allowincomplete) | 618 | taskdata[mc] = bb.taskdata.TaskData(halt, skiplist=self.skiplist_by_mc[mc], allowincomplete=allowincomplete) |
618 | localdata[mc] = data.createCopy(self.databuilder.mcdata[mc]) | 619 | localdata[mc] = bb.data.createCopy(self.databuilder.mcdata[mc]) |
619 | bb.data.expandKeys(localdata[mc]) | 620 | bb.data.expandKeys(localdata[mc]) |
620 | 621 | ||
621 | current = 0 | 622 | current = 0 |
@@ -936,7 +937,7 @@ class BBCooker: | |||
936 | for mc in self.multiconfigs: | 937 | for mc in self.multiconfigs: |
937 | # First get list of recipes, including skipped | 938 | # First get list of recipes, including skipped |
938 | recipefns = list(self.recipecaches[mc].pkg_fn.keys()) | 939 | recipefns = list(self.recipecaches[mc].pkg_fn.keys()) |
939 | recipefns.extend(self.skiplist.keys()) | 940 | recipefns.extend(self.skiplist_by_mc[mc].keys()) |
940 | 941 | ||
941 | # Work out list of bbappends that have been applied | 942 | # Work out list of bbappends that have been applied |
942 | applied_appends = [] | 943 | applied_appends = [] |
@@ -2355,7 +2356,7 @@ class CookerParser(object): | |||
2355 | for virtualfn, info_array in result: | 2356 | for virtualfn, info_array in result: |
2356 | if info_array[0].skipped: | 2357 | if info_array[0].skipped: |
2357 | self.skipped += 1 | 2358 | self.skipped += 1 |
2358 | self.cooker.skiplist[virtualfn] = SkippedPackage(info_array[0]) | 2359 | self.cooker.skiplist_by_mc[mc][virtualfn] = SkippedPackage(info_array[0]) |
2359 | self.bb_caches[mc].add_info(virtualfn, info_array, self.cooker.recipecaches[mc], | 2360 | self.bb_caches[mc].add_info(virtualfn, info_array, self.cooker.recipecaches[mc], |
2360 | parsed=parsed, watcher = self.cooker.add_filewatch) | 2361 | parsed=parsed, watcher = self.cooker.add_filewatch) |
2361 | return True | 2362 | return True |