@@ -2107,6 +2107,7 @@ from . import gitannex
from . import local
from . import svn
from . import wget
+from . import curl
from . import ssh
from . import sftp
from . import s3
@@ -2123,6 +2124,7 @@ from . import gomod
methods.append(local.Local())
methods.append(wget.Wget())
+methods.append(curl.Curl())
methods.append(svn.Svn())
methods.append(git.Git())
methods.append(gitsm.GitSM())
@@ -60,10 +60,20 @@ class Wget(FetchMethod):
"""
return (d.getVar("BB_CHECK_SSL_CERTS") or "1") != "0"
+ def is_enabled(self, d):
+ """
+ wget method is enabled when BB_FETCH_METHOD_HTTP = "wget" or by default
+ when BB_FETCH_METHOD_HTTP variable is not set.
+ """
+ method_http: str = d.getVar("BB_FETCH_METHOD_HTTP") or "wget"
+ return method_http == "wget"
+
def supports(self, ud, d):
"""
Check to see if a given url can be fetched with wget.
"""
+ if not self.is_enabled(d):
+ return False
return ud.type in ['http', 'https', 'ftp', 'ftps']
def recommends_checksum(self, urldata):