From 3233f3b23151685701d3ec905e8ce1ec069fa365 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 26 Mar 2025 12:25:19 +0000 Subject: bitbake: fetch2/wget: use long arguments for clarity 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. (Bitbake rev: 54039bc9d169871af6d36578df4c21bff296f6de) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/wget.py | 10 +++++----- 1 file 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): 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" @@ -122,7 +122,7 @@ class Wget(FetchMethod): fetchcmd += " --user=%s --password=%s" % (ud.user, ud.pswd) uri = ud.url.split(";")[0] - fetchcmd += " -c -P " + dldir + " '" + uri + "'" + fetchcmd += " --continue --directory-prefix=%s '%s'" % (dldir, uri) self._runwget(ud, d, fetchcmd, False) # Sanity check since wget can pretend it succeed when it didn't @@ -485,7 +485,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() -- cgit v1.2.3-54-g00ecf