summaryrefslogtreecommitdiffstats
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-07 21:13:13 +0000
commit500c66337c7cb5e3044a02ef761097713e47f523 (patch)
treee41cd48b7b6103e663343c1a38897019405d960c
parentd4b4b48addfa781d7b94965e0477974c3fb6dbb3 (diff)
downloadpoky-500c66337c7cb5e3044a02ef761097713e47f523.tar.gz
bitbake/fetch2:Fetch Make using the fn based cache optional
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index a37bd2b53e..fcece9d04b 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -774,7 +774,7 @@ class FetchMethod(object):
774 return "%s-%s" % (key, bb.data.getVar("PN", d, True) or "") 774 return "%s-%s" % (key, bb.data.getVar("PN", d, True) or "")
775 775
776class Fetch(object): 776class Fetch(object):
777 def __init__(self, urls, d): 777 def __init__(self, urls, d, cache = True):
778 if len(urls) == 0: 778 if len(urls) == 0:
779 urls = d.getVar("SRC_URI", True).split() 779 urls = d.getVar("SRC_URI", True).split()
780 self.urls = urls 780 self.urls = urls
@@ -782,14 +782,15 @@ class Fetch(object):
782 self.ud = {} 782 self.ud = {}
783 783
784 fn = bb.data.getVar('FILE', d, True) 784 fn = bb.data.getVar('FILE', d, True)
785 if fn in urldata_cache: 785 if cache and fn in urldata_cache:
786 self.ud = urldata_cache[fn] 786 self.ud = urldata_cache[fn]
787 787
788 for url in urls: 788 for url in urls:
789 if url not in self.ud: 789 if url not in self.ud:
790 self.ud[url] = FetchData(url, d) 790 self.ud[url] = FetchData(url, d)
791 791
792 urldata_cache[fn] = self.ud 792 if cache:
793 urldata_cache[fn] = self.ud
793 794
794 def localpath(self, url): 795 def localpath(self, url):
795 if url not in self.urls: 796 if url not in self.urls: