diff options
author | Rob Woolley <rob.woolley@windriver.com> | 2024-04-09 10:58:58 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-04-11 08:46:59 +0100 |
commit | f10e630fd7561746d835a4378e8777e78f56e44a (patch) | |
tree | eb400d4e429c47b9458de4b16e2d33a0765e837e /lib/bb | |
parent | 6366ea8d9c284d10bb8f4129004b55239d9022c0 (diff) | |
download | bitbake-f10e630fd7561746d835a4378e8777e78f56e44a.tar.gz |
wget: Make wget --passive-ftp option conditional on ftp/ftps
Fedora 40 introduces wget2 as a drop-in replacement for wget. This
rewrite does not currently have support for FTP. This causes
the wget fetcher to fail complaining about an unrecognized option.
Making --passive-ftp conditional based on the protocol used in
the SRC_URI limits the scope of the problem. It also gives us
an opportunity to build the older wget as a host tool.
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb')
-rw-r--r-- | lib/bb/fetch2/wget.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py index dc025800e..fbfa6938a 100644 --- a/lib/bb/fetch2/wget.py +++ b/lib/bb/fetch2/wget.py @@ -87,7 +87,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" |