diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-02 17:57:10 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-13 22:00:27 +0000 |
commit | d9879a1f60ef8d87816084186fae6cd084ca3b42 (patch) | |
tree | b66daae166b41c80733d739801266d01309ad0cc /bitbake | |
parent | b021992106c6b5ba02b825afa7dcc422b135b59b (diff) | |
download | poky-d9879a1f60ef8d87816084186fae6cd084ca3b42.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: 4ce50bbd34eefeabfeca89a6a66c71598d3c58f6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index b00aeb3afd..2ada43befc 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -1595,7 +1595,7 @@ class Fetch(object): | |||
1595 | fn = d.getVar('FILE') | 1595 | fn = d.getVar('FILE') |
1596 | mc = d.getVar('__BBMULTICONFIG') or "" | 1596 | mc = d.getVar('__BBMULTICONFIG') or "" |
1597 | if cache and fn and mc + fn in urldata_cache: | 1597 | if cache and fn and mc + fn in urldata_cache: |
1598 | self.ud = urldata_cache[mc + fn] | 1598 | self.ud = urldata_cache[mc + fn + str(id(d))] |
1599 | 1599 | ||
1600 | for url in urls: | 1600 | for url in urls: |
1601 | if url not in self.ud: | 1601 | if url not in self.ud: |
@@ -1607,7 +1607,7 @@ class Fetch(object): | |||
1607 | pass | 1607 | pass |
1608 | 1608 | ||
1609 | if fn and cache: | 1609 | if fn and cache: |
1610 | urldata_cache[mc + fn] = self.ud | 1610 | urldata_cache[mc + fn + str(id(d))] = self.ud |
1611 | 1611 | ||
1612 | def localpath(self, url): | 1612 | def localpath(self, url): |
1613 | if url not in self.urls: | 1613 | if url not in self.urls: |