From 748039c0e195da2ab3de76ab818a88352921b170 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 27 Apr 2008 11:22:54 +0000 Subject: bitbake: Sync with bitbake 1.8 branch git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4352 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- bitbake/lib/bb/fetch/wget.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'bitbake/lib/bb/fetch/wget.py') diff --git a/bitbake/lib/bb/fetch/wget.py b/bitbake/lib/bb/fetch/wget.py index f8ade45da7..a5979dead8 100644 --- a/bitbake/lib/bb/fetch/wget.py +++ b/bitbake/lib/bb/fetch/wget.py @@ -48,11 +48,13 @@ class Wget(Fetch): return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile) - def go(self, uri, ud, d): + def go(self, uri, ud, d, checkonly = False): """Fetch urls""" def fetch_uri(uri, ud, d): - if os.path.exists(ud.localpath): + if checkonly: + fetchcmd = data.getVar("FETCHCOMMAND", d, 1) + " " + data.getVar("FETCHOPTION_checkonly", d, 1) + elif os.path.exists(ud.localpath): # file exists, but we didnt complete it.. trying again.. fetchcmd = data.getVar("RESUMECOMMAND", d, 1) else: @@ -83,10 +85,10 @@ class Wget(Fetch): newuri = uri_replace(uri, find, replace, d) if newuri != uri: if fetch_uri(newuri, ud, localdata): - return + return True if fetch_uri(uri, ud, localdata): - return + return True # try mirrors mirrors = [ i.split() for i in (data.getVar('MIRRORS', localdata, 1) or "").split('\n') if i ] @@ -94,6 +96,10 @@ class Wget(Fetch): newuri = uri_replace(uri, find, replace, d) if newuri != uri: if fetch_uri(newuri, ud, localdata): - return + return True raise FetchError(uri) + + + def checkstatus(self, uri, ud, d): + return self.go(uri, ud, d, True) -- cgit v1.2.3-54-g00ecf