| Message ID | 477f90f9515cb7cd093920cee5518f662cef2e05.1728135724.git.steve@sakoman.com |
|---|---|
| State | Accepted, archived |
| Commit | 477f90f9515cb7cd093920cee5518f662cef2e05 |
| Headers | show |
| Series | [kirkstone,2.0,1/4] wget: Make wget --passive-ftp option conditional on ftp/ftps | expand |
diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py index b3a3de571..9bcb0d4b7 100644 --- a/lib/bb/fetch2/wget.py +++ b/lib/bb/fetch2/wget.py @@ -88,7 +88,10 @@ class Wget(FetchMethod): if not ud.localfile: ud.localfile = d.expand(urllib.parse.unquote(ud.host + ud.path).replace("/", ".")) - self.basecmd = d.getVar("FETCHCMD_wget") or "/usr/bin/env wget -t 2 -T 30 --passive-ftp" + self.basecmd = d.getVar("FETCHCMD_wget") or "/usr/bin/env wget -t 2 -T 30" + + if ud.type == 'ftp' or ud.type == 'ftps': + self.basecmd += " --passive-ftp" if not self.check_certs(d): self.basecmd += " --no-check-certificate"