Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make downgrading via the archives work #1158

Open
brson opened this issue Jun 10, 2017 · 4 comments
Open

Make downgrading via the archives work #1158

brson opened this issue Jun 10, 2017 · 4 comments

Comments

@brson
Copy link
Contributor

brson commented Jun 10, 2017

I expect this to work:

RUSTUP_UPDATE_ROOT=https://dev-static.rust-lang.org/rustup/archive/1.2.0 rustup self update

but it does not:

info: checking for self-updates
error: could not download file from 'https://dev-static.rust-lang.org/rustup/archive/1.2.0/release-stable.toml' to '/tmp/rustup-update.6RjOKF0hq6Ji/release-stable.toml'
info: caused by: http request returned an unsuccessful status code: 404

I suspect it used to but broke once the 'release-stable.toml' file was added.

Probably just use another environment variable like RUSTUP_UPDATE_VERSION, which circumvents the 'release-stable.toml' file and appends the appropriate archive path to the update root.

This could be useful in the case of deploying a bad rustup (where the updater still works).

@Diggsey Diggsey added this to Self installation, upgrade & uninstallation in Issue Categorisation Jun 25, 2017
@Diggsey Diggsey moved this from Self installation, upgrade & uninstallation to Toolchains & components in Issue Categorisation Jun 25, 2017
@pickfire
Copy link
Contributor

pickfire commented Aug 9, 2018

@brson The URL get an 404 error. Is this still valid?

@brson
Copy link
Contributor Author

brson commented Aug 11, 2018

@pickfire It's still valid.

Hard to recall details, but that URL in the op is a directory, so the tooling probably appends additional paths to the URLs it calls.

Here's the current output of the command in the op (though I've changed the URL to "static.rust-lang.org" instead of "dev-static", because I've forgotten what the difference is.

$ RUSTUP_UPDATE_ROOT=https://static.rust-lang.org/rustup/archive/1.2.0 rustup self update
info: checking for self-updates
error: could not download file from 'https://static.rust-lang.org/rustup/archive/1.2.0/release-stable.toml' to 'C:\cygwin64\tmp\rustup-update.52u9JHERUyFq\release-stable.toml'
info: caused by: http request returned an unsuccessful status code: 404

That's with rustup 1.13.0 (ea9259c1b 2018-07-16).

rustup only knows how to update to what's in release-stable.toml, the thing that says what the current version of rustup is, and there's no such file in the archives.

An easy hack to fix this is to add a fallback search after release-stable is not found that looks for the updater in whatever place makes this use case work.

@kinnison
Copy link
Contributor

kinnison commented Dec 3, 2020

I'd suggest simply adding an argument to rustup self update a'la rustup self update --version 1.20.0 or similar. Though I'm unsure if it's still desirable to offer users an easy way to downgrade rustup.

@kinnison
Copy link
Contributor

kinnison commented Dec 3, 2020

If this is still desirable in some form, please ping me, otherwise I've marked this inactive and will close at some point in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Issue Categorisation
Toolchains & components
Development

No branches or pull requests

3 participants