rust-lang / rust-lang/rustup

`rustup update` failing with could not rename component file

Open
#2,729 18 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

[santiago@galago ~]$ rustup --version
rustup 1.23.1 (2020-12-18)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.53.0-nightly (b84932674 2021-04-21)`

[santiago@galago ~]$ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'beta-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2021-04-23, rust version 1.53.0-nightly (7f4afdf02 2021-04-22)
info: downloading component 'rust-std' for 'i686-unknown-linux-gnu'
info: downloading component 'rustc-dev'
 95.0 MiB /  95.0 MiB (100 %)  36.6 MiB/s in  2s ETA:  0s
info: downloading component 'rust-src'
info: downloading component 'rust-analyzer-preview'
info: downloading component 'rust-analysis'
info: downloading component 'rls'
info: downloading component 'miri'
info: downloading component 'llvm-tools-preview'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
 48.8 MiB /  48.8 MiB (100 %)  36.8 MiB/s in  1s ETA:  0s
info: downloading component 'rustfmt'
info: removing previous version of component 'rust-std' for 'i686-unknown-linux-gnu'
info: removing previous version of component 'rustc-dev'
info: removing previous version of component 'rust-src'
info: removing previous version of component 'rust-analyzer-preview'
info: removing previous version of component 'rust-analysis'
info: removing previous version of component 'rls'
info: removing previous version of component 'miri'
info: removing previous version of component 'llvm-tools-preview'
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
info: installing component 'rust-std' for 'i686-unknown-linux-gnu'
info: using up to 500.0 MiB of RAM to unpack components
 24.3 MiB /  24.3 MiB (100 %)  13.0 MiB/s in  2s ETA:  0s
info: installing component 'rustc-dev'
 95.0 MiB /  95.0 MiB (100 %)  13.1 MiB/s in  7s ETA:  0s
info: installing component 'rust-src'
info: installing component 'rust-analyzer-preview'
info: installing component 'rust-analysis'
info: installing component 'rls'
info: installing component 'miri'
info: installing component 'llvm-tools-preview'
 21.4 MiB /  21.4 MiB (100 %)  13.9 MiB/s in  1s ETA:  0s
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 16.0 MiB /  16.0 MiB (100 %)   9.6 MiB/s in  1s ETA:  0s
info: rolling back changes
error: could not rename component file from '/home/santiago/.rustup/tmp/zf6jna9jd15jb4u__dir/bk' to '/home/santiago/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share/man'
error: could not rename component file from '/home/santiago/.rustup/tmp/cduhrqr9cfacgp11_dir/bk' to '/home/santiago/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu'
error: could not rename component file from '/home/santiago/.rustup/tmp/df3zlcanlr6x35r5_dir/bk' to '/home/santiago/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share/zsh'
error: could not rename component file from '/home/santiago/.rustup/tmp/ix1dug784t7aeozn_dir/bk' to '/home/santiago/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/etc'
error: could not rename component file from '/home/santiago/.rustup/tmp/l9rfug8ahze2fpjn_dir/bk' to '/home/santiago/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src'
...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported rustup update command and inspect the component installation and rollback paths involved in renaming entries under ~/.rustup. The work is done when the update no longer reports the component-file rename failures and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.