diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-27 14:43:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-30 12:33:50 +0100 |
commit | 5c323ef6e53f1de3eaa9622e6a07a56350018799 (patch) | |
tree | 8e10114e9b7bd12da77b70c12583a0b4dade3f1f /bitbake/lib/bb/fetch2 | |
parent | 8c576c31b6af5b7c3aed6cac375040efffac0293 (diff) | |
download | poky-5c323ef6e53f1de3eaa9622e6a07a56350018799.tar.gz |
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 11 |
1 files changed, 7 insertions, 4 deletions
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): | |||
1631 | 1631 | ||
1632 | fn = d.getVar('FILE') | 1632 | fn = d.getVar('FILE') |
1633 | mc = d.getVar('__BBMULTICONFIG') or "" | 1633 | mc = d.getVar('__BBMULTICONFIG') or "" |
1634 | if cache and fn and mc + fn in urldata_cache: | 1634 | key = None |
1635 | self.ud = urldata_cache[mc + fn + str(id(d))] | 1635 | if cache and fn: |
1636 | key = mc + fn + str(id(d)) | ||
1637 | if key in urldata_cache: | ||
1638 | self.ud = urldata_cache[key] | ||
1636 | 1639 | ||
1637 | for url in urls: | 1640 | for url in urls: |
1638 | if url not in self.ud: | 1641 | if url not in self.ud: |
@@ -1643,8 +1646,8 @@ class Fetch(object): | |||
1643 | self.ud[url] = None | 1646 | self.ud[url] = None |
1644 | pass | 1647 | pass |
1645 | 1648 | ||
1646 | if fn and cache: | 1649 | if key: |
1647 | urldata_cache[mc + fn + str(id(d))] = self.ud | 1650 | urldata_cache[key] = self.ud |
1648 | 1651 | ||
1649 | def localpath(self, url): | 1652 | def localpath(self, url): |
1650 | if url not in self.urls: | 1653 | if url not in self.urls: |