From: Joshua Lock Date: Tue, 28 Sep 2010 13:01:33 +0000 (+0100) Subject: bitbake/fetch: fix logic to prevent fetches when the file already exists X-Git-Tag: yocto-4.0~44151 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15ceaaaaf777175df8fa49f08e37b23052ca2290;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake/fetch: fix logic to prevent fetches when the file already exists Signed-off-by: Joshua Lock --- diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index e04c3df3356..a787cb656b2 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py @@ -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: