summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/crate.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/crate.py')
-rw-r--r--bitbake/lib/bb/fetch2/crate.py5
1 files changed, 4 insertions, 1 deletions
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):
66 # if using upstream just fix it up nicely 66 # if using upstream just fix it up nicely
67 if host == 'crates.io': 67 if host == 'crates.io':
68 host = 'crates.io/api/v1/crates' 68 host = 'crates.io/api/v1/crates'
69 cdn_host = 'static.crates.io/crates'
70 else:
71 cdn_host = host
69 72
70 ud.url = "https://%s/%s/%s/download" % (host, name, version) 73 ud.url = "https://%s/%s/%s/download" % (cdn_host, name, version)
71 ud.parm['downloadfilename'] = "%s-%s.crate" % (name, version) 74 ud.parm['downloadfilename'] = "%s-%s.crate" % (name, version)
72 ud.parm['name'] = name 75 ud.parm['name'] = name
73 76