summaryrefslogtreecommitdiffstats
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:33 +0000
commita8640d9a603eeefdce27652f3d9b06514155bdd3 (patch)
tree0de132548685bb416d36d8a8a405e976eafb298b
parent3e42c33da58f71d0cf9d3d790a3af5561da5c21a (diff)
downloadpoky-a8640d9a603eeefdce27652f3d9b06514155bdd3.tar.gz
bitbake: 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. (Bitbake rev: 97067634b1f149b56844b10e3a5e8d0d980b6e34) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 708b83dbfa..03e56471d8 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1597,7 +1597,7 @@ class Fetch(object):
1597 fn = d.getVar('FILE') 1597 fn = d.getVar('FILE')
1598 mc = d.getVar('__BBMULTICONFIG') or "" 1598 mc = d.getVar('__BBMULTICONFIG') or ""
1599 if cache and fn and mc + fn in urldata_cache: 1599 if cache and fn and mc + fn in urldata_cache:
1600 self.ud = urldata_cache[mc + fn] 1600 self.ud = urldata_cache[mc + fn + str(id(d))]
1601 1601
1602 for url in urls: 1602 for url in urls:
1603 if url not in self.ud: 1603 if url not in self.ud:
@@ -1609,7 +1609,7 @@ class Fetch(object):
1609 pass 1609 pass
1610 1610
1611 if fn and cache: 1611 if fn and cache:
1612 urldata_cache[mc + fn] = self.ud 1612 urldata_cache[mc + fn + str(id(d))] = self.ud
1613 1613
1614 def localpath(self, url): 1614 def localpath(self, url):
1615 if url not in self.urls: 1615 if url not in self.urls: