summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-07 21:12:51 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-10 23:37:12 +0000
commit40644b5f3370878000894b57ad8c7b27c55d6ff2 (patch)
tree9b7e97eaf7cf52b4c6f2346442d8f01c8d7ebecb /lib/bb/fetch2
parent84e0ae4e97745e3baef8885ee6106895d0543c30 (diff)
downloadbitbake-40644b5f3370878000894b57ad8c7b27c55d6ff2.tar.gz
bitbake/fetch2:Fetch Make using the fn based cache optional
(From Poky rev: 500c66337c7cb5e3044a02ef761097713e47f523) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2')
-rw-r--r--lib/bb/fetch2/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index a37bd2b53..fcece9d04 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -774,7 +774,7 @@ class FetchMethod(object):
return "%s-%s" % (key, bb.data.getVar("PN", d, True) or "")
class Fetch(object):
- def __init__(self, urls, d):
+ def __init__(self, urls, d, cache = True):
if len(urls) == 0:
urls = d.getVar("SRC_URI", True).split()
self.urls = urls
@@ -782,14 +782,15 @@ class Fetch(object):
self.ud = {}
fn = bb.data.getVar('FILE', d, True)
- if fn in urldata_cache:
+ if cache and fn in urldata_cache:
self.ud = urldata_cache[fn]
for url in urls:
if url not in self.ud:
self.ud[url] = FetchData(url, d)
- urldata_cache[fn] = self.ud
+ if cache:
+ urldata_cache[fn] = self.ud
def localpath(self, url):
if url not in self.urls: