From 5c323ef6e53f1de3eaa9622e6a07a56350018799 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 27 Mar 2020 14:43:11 +0000 Subject: bitbake: fetch2: Fix urldata_cache key issues Upon inspection its clear the way the keys for this cache were being handled would break it and cause the cache to never be used. Fix this. (Bitbake rev: 9a5dd1be63395c76d3fac2c3c7ba6557fe47b442) Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/__init__.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index d8ad19b59b..eb112f069d 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -1631,8 +1631,11 @@ 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 + str(id(d))] + key = None + if cache and fn: + key = mc + fn + str(id(d)) + if key in urldata_cache: + self.ud = urldata_cache[key] for url in urls: if url not in self.ud: @@ -1643,8 +1646,8 @@ class Fetch(object): self.ud[url] = None pass - if fn and cache: - urldata_cache[mc + fn + str(id(d))] = self.ud + if key: + urldata_cache[key] = self.ud def localpath(self, url): if url not in self.urls: -- cgit v1.2.3-54-g00ecf