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

toolchain remove fails when update-hash does not exist #304

Closed
brson opened this issue Apr 13, 2016 · 8 comments
Closed

toolchain remove fails when update-hash does not exist #304

brson opened this issue Apr 13, 2016 · 8 comments

Comments

@brson
Copy link
Contributor

brson commented Apr 13, 2016

If the update hash doesn't exist for a toolchain then toolchain remove returns an error:

PS C:\Users\Jonas\Documents\breeze-emu> rustup toolchain remove nightly-i686-pc-windows-msvc
info: uninstalling toolchain 'nightly-i686-pc-windows-msvc'
error: could not remove update hash file: 'C:\Users\Jonas\.multirust\update-hashes\nightly-i686-pc-windows-msvc' (Das System kann die angegebene Datei nicht finden. (os error 2))
PS C:\Users\Jonas\Documents\breeze-emu>

In this case the metadata was in an inconsistent state after a failed toolchain remove.

If the file doesn't exist then the error should silently be ignored.

Source.

@exscape
Copy link

exscape commented Apr 28, 2017

Hmm, I just hit this over a year later.
In cygwin:

~ $ rustup toolchain uninstall nightly
info: uninstalling toolchain 'nightly-x86_64-pc-windows-gnu'
error: could not remove 'install' directory: 'C:\Users\serenity\.rustup\toolchains\nightly-x86_64-pc-windows-gnu'
info: caused by: Access is denied. (os error 5)

So I figured I'd try again in a Windows admin cmd shell:

C:\>rustup toolchain uninstall nightly
info: uninstalling toolchain 'nightly-x86_64-pc-windows-gnu'
error: could not remove 'update hash' file: 'C:\Users\serenity\.rustup\update-hashes\nightly-x86_64-pc-windows-gnu'
info: caused by: The system cannot find the file specified. (os error 2)

@Diggsey Diggsey added this to Toolchains & components in Issue Categorisation May 4, 2017
@Moraxes
Copy link

Moraxes commented Nov 25, 2017

I also ran into this. Worked around it by creating an empty file at that path. Although since its contents are evidently ignored (at least at toolchain remove time), it being missing should probably be ignored (or just don't remove it on a failed toolchain remove, I guess).

@jnm2
Copy link

jnm2 commented Feb 2, 2018

Same thing. :-(

@nox
Copy link

nox commented Apr 26, 2018

This just busted a buildbot machine in Servo's CI. Quite unfortunate.

@ghost
Copy link

ghost commented Jul 30, 2018

This issue can be closed now.
It didn't close when the fix was committed because I messed up the commit message.

@Diggsey Diggsey closed this as completed Jul 30, 2018
@CAD97
Copy link

CAD97 commented Sep 23, 2018

I just ran into this issue.

C:\Users\cad97>rustup toolchain uninstall beta-msvc
info: uninstalling toolchain 'beta-x86_64-pc-windows-msvc'
error: could not remove 'install' directory: 'D:\usr\.rustup\toolchains\beta-x86_64-pc-windows-msvc'
info: caused by: Access is denied. (os error 5)

# NOTE: RLS was running on beta-msvc in a different window; restarted RLS on beta-gnu here

C:\Users\cad97>rustup toolchain uninstall beta-msvc
info: uninstalling toolchain 'beta-x86_64-pc-windows-msvc'
error: could not remove 'update hash' file: 'D:\usr\.rustup\update-hashes\beta-x86_64-pc-windows-msvc'
info: caused by: The system cannot find the file specified. (os error 2)

@ghost
Copy link

ghost commented Sep 23, 2018

What version of rustup did you use?

@CAD97
Copy link

CAD97 commented Sep 23, 2018

C:\Users\cad97>rustup --version
rustup 1.13.0 (ea9259c1b 2018-07-16)

The latest, rustup self update doesn't install a newer version.
(But the date is before the fix; maybe a new version needs to be pushed?)
(I see 1.14 in the GitHub releases, but rustup self update does not update me to rustup:1.14.)

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

No branches or pull requests

7 participants