bitbake/fetch: fix logic to prevent fetches when the file already exists

Signed-off-by: Joshua Lock <josh@linux.intel.com>
This commit is contained in:
Joshua Lock 2010-09-28 14:01:33 +01:00
parent d85dc37b73
commit 15ceaaaaf7
1 changed files with 2 additions and 0 deletions

View 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: