summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-09 16:44:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-10 14:25:38 +0100
commit029e3cea52f86438a1d6868020b8888b5c93d623 (patch)
tree4bb82ab2204c5fce57730fef45c67a86f187e2ba
parent254488f0890c88df5915f9bdb694772a5ec4b5cb (diff)
downloadpoky-029e3cea52f86438a1d6868020b8888b5c93d623.tar.gz
poky-029e3cea52f86438a1d6868020b8888b5c93d623.tar.bz2
poky-029e3cea52f86438a1d6868020b8888b5c93d623.zip
bitbake: fetch2/wget: Use FETCHCMD_wget to provide the commandline and options
This also changes to use -t 2 -T 30 as the defaults which are more sane for a modern fetcher and already specified in OpenEmbedded metadata. (Bitbake rev: bf0e5dddf0f63cdb0648fb6d872af5ceef6fbfb0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/wget.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index e223b21b96..b784afb2e4 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -56,13 +56,15 @@ class Wget(FetchMethod):
def download(self, uri, ud, d, checkonly = False):
"""Fetch urls"""
+ basecmd = d.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate"
+
if checkonly:
- fetchcmd = data.getVar("CHECKCOMMAND_wget", d, True) or d.expand("/usr/bin/env wget --spider -t 5 --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'")
+ fetchcmd = d.getVar("CHECKCOMMAND_wget", True) or d.expand(basecmd + " -c -P ${DL_DIR} '${URI}'")
elif os.path.exists(ud.localpath):
# file exists, but we didnt complete it.. trying again..
- fetchcmd = data.getVar("RESUMECOMMAND_wget", d, True) or d.expand("/usr/bin/env wget -c -t 5 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'")
+ fetchcmd = d.getVar("RESUMECOMMAND_wget", True) or d.expand(basecmd + " --spider -P ${DL_DIR} '${URI}'")
else:
- fetchcmd = data.getVar("FETCHCOMMAND_wget", d, True) or d.expand("/usr/bin/env wget -t 5 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'")
+ fetchcmd = d.getVar("FETCHCOMMAND_wget", True) or d.expand(basecmd + " -P ${DL_DIR} '${URI}'")
uri = uri.split(";")[0]
uri_decoded = list(decodeurl(uri))