]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake/fetch: fix logic to prevent fetches when the file already exists
authorJoshua Lock <josh@linux.intel.com>
Tue, 28 Sep 2010 13:01:33 +0000 (14:01 +0100)
committerJoshua Lock <josh@linux.intel.com>
Tue, 28 Sep 2010 13:07:08 +0000 (14:07 +0100)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
bitbake/lib/bb/fetch/__init__.py

index e04c3df33562b144d65cb5014fe9a6353fe652eb..a787cb656b2d71648bda4c47d0c25f8c36977bc6 100644 (file)
@@ -263,6 +263,8 @@ def go(d, urls = None):
             # First try fetching uri, u, from PREMIRRORS
             mirrors = [ i.split() for i in (bb.data.getVar('PREMIRRORS', d, 1) or "").split('\n') if i ]
             localpath = try_mirrors(d, u, mirrors, False, m.forcefetch(u, ud, d))
+        elif os.path.exists(ud.localfile):
+            localpath = ud.localfile
 
         # Need to re-test forcefetch() which will return true if our copy is too old
         if m.forcefetch(u, ud, d) or not localpath: