diff --git a/bitbake/lib/bb/fetch2/crate.py b/bitbake/lib/bb/fetch2/crate.py index f4ddc782a9..2c10eabb5e 100644 --- a/bitbake/lib/bb/fetch2/crate.py +++ b/bitbake/lib/bb/fetch2/crate.py @@ -66,8 +66,11 @@ class Crate(Wget): # if using upstream just fix it up nicely if host == 'crates.io': host = 'crates.io/api/v1/crates' + cdn_host = 'static.crates.io/crates' + else: + cdn_host = host - ud.url = "https://%s/%s/%s/download" % (host, name, version) + ud.url = "https://%s/%s/%s/download" % (cdn_host, name, version) ud.parm['downloadfilename'] = "%s-%s.crate" % (name, version) ud.parm['name'] = name