diff options
| author | Ross Burton <ross.burton@arm.com> | 2025-03-26 12:25:19 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-27 13:40:31 +0000 |
| commit | 3233f3b23151685701d3ec905e8ce1ec069fa365 (patch) | |
| tree | 4ff06bd4d1b55d815c86ce7550ddc2eddfea2358 /bitbake/lib | |
| parent | 372a9c2d5662360dffcdd0214c73faeeeb7b2040 (diff) | |
| download | poky-3233f3b23151685701d3ec905e8ce1ec069fa365.tar.gz | |
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 <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
| -rw-r--r-- | bitbake/lib/bb/fetch2/wget.py | 10 |
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() |
