summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-21 20:32:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-31 17:05:17 +0000
commit4c5d6edb0b78ea7621d5196e9fcb5585c8fa04a4 (patch)
tree4c80abeb8ad023f48ec70ac134bb735a735ab916 /bitbake/lib/bb/cooker.py
parentcb8efd4d20d7643632b04ce8350c1b58aed49122 (diff)
downloadpoky-4c5d6edb0b78ea7621d5196e9fcb5585c8fa04a4.tar.gz
bitbake: cooker/cookerdata: Rework the way the datastores are reset
As far as I could tell, the current code could result in some strange situations where some data was set back to the original data store copy but the multiconfig data was not restored. There are also some changes made to the datastore which did not persist. The data store was also being reset at every client reset, which seems a little excessive if we can reset it to the original condition properly. Move the __depends -> __base_depends rename into databuilder along with the __bbclasstype change so these are saved in the original data. Tweak the databuilder code to be clearer and easier to follow on which copies are where, then save copies of all the mc datastores. Finally, drop the cache invalidation upon reset for the base config as we shouldn't need that now (oe-selftest -r tinfoil works with memory resident bitbake which was the original reproducer requiring that change). (Bitbake rev: 5f8b9b9c35b4ec0c8c539bf54ca85f068f4a5094) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index c712744382..7e0d6b47bf 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -400,9 +400,7 @@ class BBCooker:
400 self.disableDataTracking() 400 self.disableDataTracking()
401 401
402 for mc in self.databuilder.mcdata.values(): 402 for mc in self.databuilder.mcdata.values():
403 mc.renameVar("__depends", "__base_depends")
404 self.add_filewatch(mc.getVar("__base_depends", False), self.configwatcher) 403 self.add_filewatch(mc.getVar("__base_depends", False), self.configwatcher)
405 mc.setVar("__bbclasstype", "recipe")
406 404
407 self.baseconfig_valid = True 405 self.baseconfig_valid = True
408 self.parsecache_valid = False 406 self.parsecache_valid = False
@@ -436,10 +434,8 @@ class BBCooker:
436 upstream=upstream, 434 upstream=upstream,
437 ) 435 )
438 self.hashserv.serve_as_process() 436 self.hashserv.serve_as_process()
439 self.data.setVar("BB_HASHSERVE", self.hashservaddr)
440 self.databuilder.origdata.setVar("BB_HASHSERVE", self.hashservaddr)
441 self.databuilder.data.setVar("BB_HASHSERVE", self.hashservaddr)
442 for mc in self.databuilder.mcdata: 437 for mc in self.databuilder.mcdata:
438 self.databuilder.mcorigdata[mc].setVar("BB_HASHSERVE", self.hashservaddr)
443 self.databuilder.mcdata[mc].setVar("BB_HASHSERVE", self.hashservaddr) 439 self.databuilder.mcdata[mc].setVar("BB_HASHSERVE", self.hashservaddr)
444 440
445 bb.parse.init_parser(self.data) 441 bb.parse.init_parser(self.data)
@@ -1788,8 +1784,9 @@ class BBCooker:
1788 if hasattr(self, "data"): 1784 if hasattr(self, "data"):
1789 self.databuilder.reset() 1785 self.databuilder.reset()
1790 self.data = self.databuilder.data 1786 self.data = self.databuilder.data
1787 # In theory tinfoil could have modified the base data before parsing,
1788 # ideally need to track if anything did modify the datastore
1791 self.parsecache_valid = False 1789 self.parsecache_valid = False
1792 self.baseconfig_valid = False
1793 1790
1794 1791
1795class CookerExit(bb.event.Event): 1792class CookerExit(bb.event.Event):