@@ -82,7 +82,7 @@ class Wget(FetchMethod):
if not ud.localfile:
ud.localfile = ud.host + ud.path.replace("/", ".")
- self.basecmd = d.getVar("FETCHCMD_wget") or "/usr/bin/env wget -t 2 -T 100"
+ self.basecmd = d.getVar("FETCHCMD_wget") or "/usr/bin/env wget --tries=2 --timeout=100"
if ud.type == 'ftp' or ud.type == 'ftps':
self.basecmd += " --passive-ftp"
@@ -96,7 +96,7 @@ class Wget(FetchMethod):
logger.debug2("Fetching %s using command '%s'" % (ud.url, command))
bb.fetch2.check_network_access(d, command, ud.url)
- runfetchcmd(command + ' --progress=dot -v', d, quiet, log=progresshandler, workdir=workdir)
+ runfetchcmd(command + ' --progress=dot --verbose', d, quiet, log=progresshandler, workdir=workdir)
def download(self, ud, d):
"""Fetch urls"""
@@ -106,7 +106,7 @@ class Wget(FetchMethod):
dldir = os.path.realpath(d.getVar("DL_DIR"))
localpath = os.path.join(dldir, ud.localfile) + ".tmp"
bb.utils.mkdirhier(os.path.dirname(localpath))
- fetchcmd += " -O %s" % shlex.quote(localpath)
+ fetchcmd += " --output-document-%s" % shlex.quote(localpath)
if ud.user and ud.pswd:
fetchcmd += " --auth-no-challenge"
@@ -124,9 +124,9 @@ class Wget(FetchMethod):
uri = ud.url.split(";")[0]
if os.path.exists(ud.localpath):
# file exists, but we didnt complete it.. trying again..
- fetchcmd += " -c -P " + dldir + " '" + uri + "'"
+ fetchcmd += " --continue --directory-prefix=" + dldir + " '" + uri + "'"
else:
- fetchcmd += " -P " + dldir + " '" + uri + "'"
+ fetchcmd += " --directory-prefix=" + dldir + " '" + uri + "'"
self._runwget(ud, d, fetchcmd, False)
@@ -490,7 +490,7 @@ class Wget(FetchMethod):
f = tempfile.NamedTemporaryFile()
with tempfile.TemporaryDirectory(prefix="wget-index-") as workdir, tempfile.NamedTemporaryFile(dir=workdir, prefix="wget-listing-") as f:
fetchcmd = self.basecmd
- fetchcmd += " -O " + f.name + " '" + uri + "'"
+ fetchcmd += " --output-document=%s '%s'" % (f.name, uri)
try:
self._runwget(ud, d, fetchcmd, True, workdir=workdir)
fetchresult = f.read()
It's best practise to use long-form arguments in scripts where the conciseness of short arguments is less useful than in an interactive terminal. Signed-off-by: Ross Burton <ross.burton@arm.com> --- bitbake/lib/bb/fetch2/wget.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)