brson / multirust

[DEPRECATED] A tool for managing multiple Rust installations
658 stars 36 forks source link

Multirust defaults to a super slow server when downloading #93

Open SirVer opened 8 years ago

SirVer commented 8 years ago

When running multirust update the other day, it was downloading from here:

http://static-rust-lang-org.s3-website-us-west-1.amazonaws.com/dist/2015-08-16/rust-nightly-x86_64-apple-darwin.tar.gz

which took ~30 minutes.

If I download from here:

https://static.rust-lang.org/dist/2015-08-16/rust-nightly-x86_64-apple-darwin.tar.gz

the download finishes in ~30s. I am in Europe.

Why is multirust defaulting to us-west?

brson commented 8 years ago

multirust goes directly to s3, bypassing the cdn, when gpg is available because we have problems with the cdn becoming out of sync.

SirVer commented 8 years ago

How can I skip gpg checks then? 30 minutes is just way too long.

brson commented 8 years ago

Defeat this check to avoid downgrading to s3. Probably setting RUSTUP_DIST_SERVER=https://static.rust-lang.org/ (with the trailing slash) will work.

SirVer commented 8 years ago

@brson Thanks, this worked:

RUSTUP_DIST_SERVER=https://static.rust-lang.org  multirust update

With the trailing slash it did not work:

rustup: couldn't download checksum file 'https://static.rust-lang.org//dist/channel-rust-nightly.sha256'
brson commented 8 years ago

Here's how I want to solve this: use the CDN, but when a checksum failure occurs and gpg is available, try s3.