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

rustup update doesn't give the same info as rustup update [toolchain] #1245

Closed
ghost opened this issue Sep 1, 2017 · 2 comments
Closed

rustup update doesn't give the same info as rustup update [toolchain] #1245

ghost opened this issue Sep 1, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 1, 2017

Not sure if this is intended or not, but it caused me a bit of confusion for a second.
rustup version: rustup 1.6.0 (a11c01e8c 2017-08-30)

Example rustup udpate:

ayyy@lmao:~$ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2017-08-31, rust version 1.20.0 (f3d6973f4 2017-08-27)
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: removing component 'rustc'
info: removing component 'rust-std'
info: removing component 'cargo'
info: removing component 'rust-docs'
info: installing component 'rustc'
info: installing component 'rust-std'
info: rolling back changes
error: could not rename component directory from '/home/ayyy/.rustup/tmp/h8hipktpem0zivuh_dir/bk' to '/home/ayyy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share'
error: could not rename component directory from '/home/ayyy/.rustup/tmp/ttg877_3qsc6p19y_dir/bk' to '/home/ayyy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc'
error: could not rename component directory from '/home/ayyy/.rustup/tmp/mmybksvd3gf7pnky_dir/bk' to '/home/ayyy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/man'
error: failed to extract package
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2017-09-01, rust version 1.21.0-nightly (97b01abf3 2017-08-31)
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: downloading component 'rust-src'
info: downloading component 'rust-analysis'
info: downloading component 'rls'
info: removing component 'rustc'
info: removing component 'rust-std'
info: removing component 'cargo'
info: removing component 'rust-docs'
info: removing component 'rust-src'
info: removing component 'rust-analysis'
info: removing component 'rls'
info: installing component 'rustc'
info: rolling back changes
error: could not rename component directory from '/home/ayyy/.rustup/tmp/mjh0dg3_8qsgim9x_dir/bk' to '/home/ayyy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share'
error: could not rename component directory from '/home/ayyy/.rustup/tmp/ueiv97badjzqhe8l_dir/bk' to '/home/ayyy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share/doc'
error: could not rename component directory from '/home/ayyy/.rustup/tmp/p_gqet1ewgp_373__dir/bk' to '/home/ayyy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share/man'
error: could not copy file from '/home/ayyy/.rustup/tmp/bbi39d8llvgw6o7z_dir/rustc/lib/librustc_data_structures-9e9d3520f52f8728.so' to '/home/ayyy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_data_structures-9e9d3520f52f8728.so'
info: checking for self-updates

   stable-x86_64-unknown-linux-gnu update failed - rustc 1.19.0 (0ade33941 2017-07-17)
  nightly-x86_64-unknown-linux-gnu update failed - rustc 1.21.0-nightly (52a330969 2017-07-27)

example rustup update stable

ayyy@lmao:~$ rustup update stable
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2017-08-31, rust version 1.20.0 (f3d6973f4 2017-08-27)
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: removing component 'rustc'
info: removing component 'rust-std'
info: removing component 'cargo'
info: removing component 'rust-docs'
info: installing component 'rustc'
info: installing component 'rust-std'
info: rolling back changes
error: could not rename component directory from '/home/ayyy/.rustup/tmp/i1rrw2ou4pyrq86i_dir/bk' to '/home/ayyy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share'
error: could not rename component directory from '/home/ayyy/.rustup/tmp/yhaswzpceuaea990_dir/bk' to '/home/ayyy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc'
error: could not rename component directory from '/home/ayyy/.rustup/tmp/j29s2wtvu7kj3mky_dir/bk' to '/home/ayyy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/man'
error: failed to extract package
info: caused by: failed to unpack `rust-std-1.20.0-x86_64-unknown-linux-gnu/rust-std-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknow` into `/home/ayyy/.rustup/tmp/8rcvfnrtvjg5b7vm_dir/rust-std-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_metadata-13da673fe759b483.so`
info: caused by: No space left on device (os error 28)

It ended up being that I didn't have enough space (only 300MB left), but getting the info on why an error occurred, even if they are different for different toolchains, would still be helpful.
I haven't tested what it says if you only have one toolchain installed, so I'm not completely sure in that situation; #1243 seems to suggest that it still happens, though.

@ghost
Copy link
Author

ghost commented Sep 1, 2017

Interesting, i fixed the disk space thing, now im getting a different error, this one specifically about renaming the directories. Not sure what is going on.

ayyy@lmao:~$ rustup update stable
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
214.6 KiB / 214.6 KiB (100 %) 103.5 KiB/s ETA:   0 s                
info: latest update on 2017-08-31, rust version 1.20.0 (f3d6973f4 2017-08-27)
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: removing component 'rustc'
info: removing component 'rust-std'
info: removing component 'cargo'
info: removing component 'rust-docs'
info: installing component 'rustc'
info: installing component 'rust-std'
info: rolling back changes
error: could not rename component directory from '/home/ayyy/.rustup/tmp/46k0o34x0iug5hy7_dir/bk' to '/home/ayyy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share'
error: could not rename component directory from '/home/ayyy/.rustup/tmp/i28tveossg7_ul2r_dir/bk' to '/home/ayyy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc'
error: could not rename component directory from '/home/ayyy/.rustup/tmp/1mgq23blrunnn7wr_dir/bk' to '/home/ayyy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/man'
error: failed to install component: 'rust-std-x86_64-unknown-linux-gnu', detected conflict: '"lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-29fb1fb52cf57377.rlib"'

edit: removing the conflicting library fixed it, just not sure why it occurred in the first place.

@rbtcollins
Copy link
Contributor

This is another instance of missing/corrupt manifest data. Without knowledge of the installed file, rustup cannot remove it prior to installing the updated version, and then hits a conflict due to the file already existing, and you get the error.

We've got a bunch of these bugs scattered all over the place, I'm closing them all to bring order. See #2417.

The first thing you posted showed the error right before checking for self-updates:

error: could not copy file from '/home/ayyy/.rustup/tmp/bbi39d8llvgw6o7z_dir/rustc/lib/librustc_data_structures-9e9d3520f52f8728.so' to '/home/ayyy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_data_structures-9e9d3520f52f8728.so'

And after that you were in trouble - see the bug I've linked for details.

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

1 participant