summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cookerdata.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-07 13:16:39 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-17 17:51:03 +0000
commitebfa1700f41b3411aec040144605166c35b8dd14 (patch)
tree37e9b4aba5a8c07e677bf1b982091ad835479821 /bitbake/lib/bb/cookerdata.py
parentd09e2e05a0391ad4d718214516d92a160f89767e (diff)
downloadpoky-ebfa1700f41b3411aec040144605166c35b8dd14.tar.gz
bitbake: fetch2/cooker: Fix source revision handling with floating upstreams
Where a git url uses a tag instead of a full source revision, breakage can currently occur in builds. Issues include: * the revision being looked up in multiple tasks (fetch and unpack) * the risk a different revision may be obtained in those tasks * that some tasks may not be allowed to access the network * that a revision may not be consistent throughout a given build * rerunning a specific task may given inconsistent results To fix this, stop the workers from cleaning out the source revision store. This should only be done in the cooker itself (based on current policy). Also, where the code "sees" an upstream access, mark the recipe as not to be cached. The reparse re-triggers the upstream lookup by the server. Add a test to ensure that if get_srcrev isn't called, the user is told they're using a configuration that is known to break. (Bitbake rev: 4b5eed1626709ef3dc06b32fd55d40a2a6edd179) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cookerdata.py')
-rw-r--r--bitbake/lib/bb/cookerdata.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index 397b43dfa7..a961f36574 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -258,12 +258,12 @@ class CookerDataBuilder(object):
258 self.data = self.basedata 258 self.data = self.basedata
259 self.mcdata = {} 259 self.mcdata = {}
260 260
261 def parseBaseConfiguration(self): 261 def parseBaseConfiguration(self, worker=False):
262 data_hash = hashlib.sha256() 262 data_hash = hashlib.sha256()
263 try: 263 try:
264 self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles) 264 self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles)
265 265
266 if self.data.getVar("BB_WORKERCONTEXT", False) is None: 266 if self.data.getVar("BB_WORKERCONTEXT", False) is None and not worker:
267 bb.fetch.fetcher_init(self.data) 267 bb.fetch.fetcher_init(self.data)
268 bb.parse.init_parser(self.data) 268 bb.parse.init_parser(self.data)
269 bb.codeparser.parser_cache_init(self.data) 269 bb.codeparser.parser_cache_init(self.data)