cargo.eclass: use static.crates.io cdn

Starting from 2024-03-12, cargo began to download crates directly from
static.crates.io CDN servers worldwide. See
https://blog.rust-lang.org/2024/03/11/crates-io-download-changes.html

Signed-off-by: swomf <swomf@proton.me>
Closes: https://github.com/gentoo/gentoo/pull/40944
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
swomf
2025-03-07 11:03:46 -05:00
committed by Arthur Zamarin
parent 3b573d2233
commit 89ebdf7e00

View File

@@ -269,7 +269,7 @@ _cargo_set_crate_uris() {
name="${BASH_REMATCH[1]}"
version="${BASH_REMATCH[2]}"
fi
url="https://crates.io/api/v1/crates/${name}/${version}/download -> ${name}-${version}.crate"
url="https://static.crates.io/api/v1/crates/${name}/${version}/download -> ${name}-${version}.crate"
CARGO_CRATE_URIS+="${url} "
# when invoked by pkgbump, avoid fetching all the crates