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

Re-running rustup-init deletes multirust directory instead of migrating it #848

Closed
xen0n opened this issue Dec 7, 2016 · 2 comments
Closed

Comments

@xen0n
Copy link
Contributor

xen0n commented Dec 7, 2016

This is definitely caused by #830, although I haven't looked closely into the patch. This would affect those people who:

  • blindly re-rustup-init when there's an update, or
  • compile their own rustup-init in the meantime (although this group may be small).

Steps to repro (assuming you're already on .rustup):

# Backup your toolchains; they'll go away!
cp -r .rustup <some-backup-location>
# Revert to old dir layout
rm .multirust
mv .rustup .multirust
# Re-run `rustup-init`
/path/to/your/dev/rustup-init
# Just ^C after the installation begins
ls ~/.rustup
# Boom! the original toolchains and settings are gone.

This is likely due to the unconditional create_rustup_home which ultimately deleted the legacy rustup home during symlinking. We should perform the migration before proceeding with home creation.

@xen0n
Copy link
Contributor Author

xen0n commented Dec 7, 2016

n.b. This is discovered on my MIPS64 box, where there's presently no other way to update rustup, apart from manually copying rustup-init over to the proxy binaries under ~/.cargo/bin which is tedious.

@brson
Copy link
Contributor

brson commented Dec 15, 2016

Thanks for the report. Looking into it.

brson added a commit to brson/rustup.rs that referenced this issue Dec 15, 2016
bors added a commit that referenced this issue Dec 15, 2016
Upgrade ~/.multirust correctly from rustup-init

Fixes #848

r? @alexcrichton
bors added a commit that referenced this issue Dec 16, 2016
Upgrade ~/.multirust correctly from rustup-init

Fixes #848

r? @alexcrichton
nodakai pushed a commit to nodakai/rustup.rs that referenced this issue Apr 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants