summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
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:22 +0000
commitf9d4afbb06d078734a77b803d15ab32166f510d1 (patch)
tree68963fb7252c089ddff860a9dcd00309f828a1dd /bitbake/lib
parent17c1e5fc076e2d9dafd4da8fbf23fc097c5dff02 (diff)
downloadpoky-f9d4afbb06d078734a77b803d15ab32166f510d1.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: 1a79651c518abc35b99005c137ab7e82a99c75b0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-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 1f5f8f1f14..07de6c2693 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1593,7 +1593,7 @@ class Fetch(object):
1593 fn = d.getVar('FILE') 1593 fn = d.getVar('FILE')
1594 mc = d.getVar('__BBMULTICONFIG') or "" 1594 mc = d.getVar('__BBMULTICONFIG') or ""
1595 if cache and fn and mc + fn in urldata_cache: 1595 if cache and fn and mc + fn in urldata_cache:
1596 self.ud = urldata_cache[mc + fn] 1596 self.ud = urldata_cache[mc + fn + str(id(d))]
1597 1597
1598 for url in urls: 1598 for url in urls:
1599 if url not in self.ud: 1599 if url not in self.ud:
@@ -1605,7 +1605,7 @@ class Fetch(object):
1605 pass 1605 pass
1606 1606
1607 if fn and cache: 1607 if fn and cache:
1608 urldata_cache[mc + fn] = self.ud 1608 urldata_cache[mc + fn + str(id(d))] = self.ud
1609 1609
1610 def localpath(self, url): 1610 def localpath(self, url):
1611 if url not in self.urls: 1611 if url not in self.urls: