diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-05-10 21:34:59 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-05-25 10:32:12 +0100 |
commit | 27b872ed4fbe73b3b61e14cb885bb7c16c039cdb (patch) | |
tree | 7c1e1916aaba78dfbc69e8283969c0bbf65531d2 | |
parent | 9af52b748357d0c843ce2507ce4d119fd9c37008 (diff) | |
download | bitbake-27b872ed4fbe73b3b61e14cb885bb7c16c039cdb.tar.gz |
cooker: Fix/improve collections handling
Code changes for FILE_LAYERNAME exposed lifecycle issues around the collections
object in Cooker which only appeared in devtool usage in eSDK. Move
the collections setup to an earlier stage after parsing completes to
avoid any kind of race around it.
Also stop overwriting the code variable in MatchFiles. Ultimately we
need to combine these codepaths but that is for another patch.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/cooker.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 554c7f10a..2a0ef2875 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -504,6 +504,9 @@ class BBCooker: self.recipecaches[mc] = bb.cache.CacheData(self.caches_array) self.handleCollections(self.data.getVar("BBFILE_COLLECTIONS")) + self.collections = {} + for mc in self.multiconfigs: + self.collections[mc] = CookerCollectFiles(self.bbfile_config_priorities, mc) self._parsecache_set(False) @@ -1378,8 +1381,8 @@ class BBCooker: if bf.startswith("/") or bf.startswith("../"): bf = os.path.abspath(bf) - self.collections = {mc: CookerCollectFiles(self.bbfile_config_priorities, mc)} - filelist, masked, searchdirs = self.collections[mc].collect_bbfiles(self.databuilder.mcdata[mc], self.databuilder.mcdata[mc]) + collections = {mc: CookerCollectFiles(self.bbfile_config_priorities, mc)} + filelist, masked, searchdirs = collections[mc].collect_bbfiles(self.databuilder.mcdata[mc], self.databuilder.mcdata[mc]) try: os.stat(bf) bf = os.path.abspath(bf) @@ -1676,13 +1679,10 @@ class BBCooker: for dep in self.configuration.extra_assume_provided: self.recipecaches[mc].ignored_dependencies.add(dep) - self.collections = {} - mcfilelist = {} total_masked = 0 searchdirs = set() for mc in self.multiconfigs: - self.collections[mc] = CookerCollectFiles(self.bbfile_config_priorities, mc) (filelist, masked, search) = self.collections[mc].collect_bbfiles(self.databuilder.mcdata[mc], self.databuilder.mcdata[mc]) mcfilelist[mc] = filelist |