aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-02 17:57:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-13 22:00:03 +0000
commit4ce50bbd34eefeabfeca89a6a66c71598d3c58f6 (patch)
treeb4194d8a94c72a8331be8f594f60b3f1cce534f5
parentb7483a7738daf69902ef590a8144a557576bbce0 (diff)
downloadbitbake-contrib-4ce50bbd34eefeabfeca89a6a66c71598d3c58f6.tar.gz
fetch2: Ensure cached url data is matched to a datastore
There was a weird error in OE-Core where "devtool modify virtual/kernel" was showing basehash mismatch errors. This was due to SRCPV sometimes being: AUTOINC+b867b78b50_47b80ef7bd and sometimes AUTOINC+b867b78b50_255a750d28. The latter hash comes from KBRANCH and meant sometimes the correct branch was seen, sometimes it was not. The issue was complicated by the execution using a remote datastore over tinfoil. The problem turns out to be a fetcher caching error. If the datastore changes, the cached url data may not be valid. We therefore ensure we match cached url data against the datastore that generated it, which appears to fix this issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index b00aeb3af..2ada43bef 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1595,7 +1595,7 @@ class Fetch(object):
fn = d.getVar('FILE')
mc = d.getVar('__BBMULTICONFIG') or ""
if cache and fn and mc + fn in urldata_cache:
- self.ud = urldata_cache[mc + fn]
+ self.ud = urldata_cache[mc + fn + str(id(d))]
for url in urls:
if url not in self.ud:
@@ -1607,7 +1607,7 @@ class Fetch(object):
pass
if fn and cache:
- urldata_cache[mc + fn] = self.ud
+ urldata_cache[mc + fn + str(id(d))] = self.ud
def localpath(self, url):
if url not in self.urls: