summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-27 14:43:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-29 20:02:38 +0100
commit9a5dd1be63395c76d3fac2c3c7ba6557fe47b442 (patch)
tree90c1ea640734bdb605df67ff98c038008dd5cc9d
parent5bd29d448a31c132afd6fc0127029e246759b87b (diff)
downloadbitbake-9a5dd1be63395c76d3fac2c3c7ba6557fe47b442.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/__init__.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index d8ad19b59..eb112f069 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/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: