summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Anderholm <johan.anderholm@axis.com>2026-04-27 15:51:23 +0200
committerPaul Barker <paul@pbarker.dev>2026-04-28 17:13:27 +0100
commitb0134a0f1382a267f79ec881af916d641d41b235 (patch)
tree04d8698e40a8d63bb3db6ce299f53231f9302ed8
parent4a5e618f5713600552c6c3edb1bfaa42c4506789 (diff)
downloadpoky-kirkstone.tar.gz
bitbake: fetch2/crate: use CDN for fetching crateskirkstone
This avoids the 1 req/sec that the API has. Reference: https://github.com/rust-lang/crates.io/issues/13482 Reference: https://blog.rust-lang.org/2024/03/11/crates-io-download-changes/ [RP: Tweak to apply to 2.8] (Bitbake rev: a9f09b9e2f187f07a6f6dfd1caa3fd2f3d564a8a) Signed-off-by: Johan Anderholm <johanam@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Paul Barker <paul@pbarker.dev>
-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