summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/wget.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/wget.py')
-rw-r--r--bitbake/lib/bb/fetch2/wget.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index ee7afd3fda..7e43d3bc97 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -82,7 +82,7 @@ class Wget(FetchMethod):
82 if not ud.localfile: 82 if not ud.localfile:
83 ud.localfile = ud.host + ud.path.replace("/", ".") 83 ud.localfile = ud.host + ud.path.replace("/", ".")
84 84
85 self.basecmd = d.getVar("FETCHCMD_wget") or "/usr/bin/env wget -t 2 -T 100" 85 self.basecmd = d.getVar("FETCHCMD_wget") or "/usr/bin/env wget --tries=2 --timeout=100"
86 86
87 if ud.type == 'ftp' or ud.type == 'ftps': 87 if ud.type == 'ftp' or ud.type == 'ftps':
88 self.basecmd += " --passive-ftp" 88 self.basecmd += " --passive-ftp"
@@ -96,7 +96,7 @@ class Wget(FetchMethod):
96 96
97 logger.debug2("Fetching %s using command '%s'" % (ud.url, command)) 97 logger.debug2("Fetching %s using command '%s'" % (ud.url, command))
98 bb.fetch2.check_network_access(d, command, ud.url) 98 bb.fetch2.check_network_access(d, command, ud.url)
99 runfetchcmd(command + ' --progress=dot -v', d, quiet, log=progresshandler, workdir=workdir) 99 runfetchcmd(command + ' --progress=dot --verbose', d, quiet, log=progresshandler, workdir=workdir)
100 100
101 def download(self, ud, d): 101 def download(self, ud, d):
102 """Fetch urls""" 102 """Fetch urls"""
@@ -106,7 +106,7 @@ class Wget(FetchMethod):
106 dldir = os.path.realpath(d.getVar("DL_DIR")) 106 dldir = os.path.realpath(d.getVar("DL_DIR"))
107 localpath = os.path.join(dldir, ud.localfile) + ".tmp" 107 localpath = os.path.join(dldir, ud.localfile) + ".tmp"
108 bb.utils.mkdirhier(os.path.dirname(localpath)) 108 bb.utils.mkdirhier(os.path.dirname(localpath))
109 fetchcmd += " -O %s" % shlex.quote(localpath) 109 fetchcmd += " --output-document=%s" % shlex.quote(localpath)
110 110
111 if ud.user and ud.pswd: 111 if ud.user and ud.pswd:
112 fetchcmd += " --auth-no-challenge" 112 fetchcmd += " --auth-no-challenge"
@@ -122,7 +122,7 @@ class Wget(FetchMethod):
122 fetchcmd += " --user=%s --password=%s" % (ud.user, ud.pswd) 122 fetchcmd += " --user=%s --password=%s" % (ud.user, ud.pswd)
123 123
124 uri = ud.url.split(";")[0] 124 uri = ud.url.split(";")[0]
125 fetchcmd += " -c -P " + dldir + " '" + uri + "'" 125 fetchcmd += " --continue --directory-prefix=%s '%s'" % (dldir, uri)
126 self._runwget(ud, d, fetchcmd, False) 126 self._runwget(ud, d, fetchcmd, False)
127 127
128 # Sanity check since wget can pretend it succeed when it didn't 128 # Sanity check since wget can pretend it succeed when it didn't
@@ -485,7 +485,7 @@ class Wget(FetchMethod):
485 f = tempfile.NamedTemporaryFile() 485 f = tempfile.NamedTemporaryFile()
486 with tempfile.TemporaryDirectory(prefix="wget-index-") as workdir, tempfile.NamedTemporaryFile(dir=workdir, prefix="wget-listing-") as f: 486 with tempfile.TemporaryDirectory(prefix="wget-index-") as workdir, tempfile.NamedTemporaryFile(dir=workdir, prefix="wget-listing-") as f:
487 fetchcmd = self.basecmd 487 fetchcmd = self.basecmd
488 fetchcmd += " -O " + f.name + " '" + uri + "'" 488 fetchcmd += " --output-document=%s '%s'" % (f.name, uri)
489 try: 489 try:
490 self._runwget(ud, d, fetchcmd, True, workdir=workdir) 490 self._runwget(ud, d, fetchcmd, True, workdir=workdir)
491 fetchresult = f.read() 491 fetchresult = f.read()