]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake/fetch2:Fetch Make using the fn based cache optional
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Feb 2011 21:12:51 +0000 (21:12 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Feb 2011 21:13:13 +0000 (21:13 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/fetch2/__init__.py

index a37bd2b53ece5003c9e93fcc68cf9d578ef22feb..fcece9d04bd5444f4c14e324d29ef0c2f58d52e5 100644 (file)
@@ -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: