bitbake: fetch2: Only cache data if fn is set, its pointless caching it against a...
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 20 Jun 2012 12:38:53 +0000 (12:38 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Jun 2012 12:10:32 +0000 (13:10 +0100)
(From Poky rev: c2df30bf6d1f8c263a38c45866936c1bf496ece5)

(Bitbake rev: f4b59cc6e1c3ddc168a1678ce39ff402ea1ff4cc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/fetch2/__init__.py

index 067d60c..2eeec3d 100644 (file)
@@ -1028,7 +1028,7 @@ class Fetch(object):
         self.ud = {}
 
         fn = d.getVar('FILE', True)
-        if cache and fn in urldata_cache:
+        if cache and fn and fn in urldata_cache:
             self.ud = urldata_cache[fn]
 
         for url in urls:
@@ -1040,7 +1040,7 @@ class Fetch(object):
                         self.ud[url] = None
                         pass
 
-        if cache:
+        if fn and cache:
             urldata_cache[fn] = self.ud
 
     def localpath(self, url):