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

winget upgrade for rustup is broken #3102

Closed
remidebette opened this issue Nov 1, 2022 · 9 comments
Closed

winget upgrade for rustup is broken #3102

remidebette opened this issue Nov 1, 2022 · 9 comments
Labels
bug fixed-next-release This issue will be fixed in the next release of rustup.

Comments

@remidebette
Copy link

Problem

Hi, thank you for the nice tool.

I am installing rustup with winget, which is becoming the de facto tool for managing packages in Windows.

❯ winget install --id Rustlang.Rustup

My issue is that to this date I cannot seamlessly use the upgrade function of winget due to rustup not been upgraded by the tool:

❯ winget upgrade --id Rustlang.Rustup
This package's version number cannot be determined. To upgrade it anyway, add the argument --include-unknown to your previous command.

Adding the --include-unknown parameter is not a good solution because I am never not in a state where the system is 'up to date'

Steps

You can see the main reason is that winget is unable to detect the current version of rustup:

❯ winget upgrade --include-unknown
Name                                 Id                        Version Available Source
---------------------------------------------------------------------------------------
Rustup: the Rust toolchain installer Rustlang.Rustup           Unknown 1.25.1    winget

Possible Solution(s)

Expected Behavior:
The actual version of the currently installed version should appear as so:

❯ winget upgrade --include-unknown
Name                                 Id                        Version Available Source
---------------------------------------------------------------------------------------
Rustup: the Rust toolchain installer Rustlang.Rustup           1.25.1  1.25.1    winget

Additional context:
As explained here: microsoft/winget-cli#1356
The version used by winget is simply the information provided from Control Panel
Apparently, all that is needed is to add a DisplayVersion key in the registry when installing.

See how the Control panel does not see the version:
image

Here is an example of a program with a version:
image

Notes

No response

Rustup version

any version

currently I am using 1.25.1

Installed toolchains

Default host: x86_64-pc-windows-msvc

stable-x86_64-pc-windows-msvc (default)
rustc 1.64.0 (a55dd71d5 2022-09-19)
@remidebette remidebette added the bug label Nov 1, 2022
@fbstj
Copy link

fbstj commented Dec 9, 2022

microsoft/winget-pkgs#67393 is a corresponding issue in the repository

@remidebette
Copy link
Author

remidebette commented Dec 9, 2022

So this should already be solved by #3047, provided the new version is correctly referenced in the winget registry?

Which version of rustup is expected to have the fix by the way?

@schlamar
Copy link

Not the current one, as this predates the fix

>rustup --version
rustup 1.25.1 (bb60b1e89 2022-07-12)

So this should be fixed with the next rustup release I guess.

@Rustin170506 Rustin170506 added the fixed-next-release This issue will be fixed in the next release of rustup. label Dec 29, 2022
@Rustin170506
Copy link
Member

Rustin170506 commented Dec 29, 2022

So this should be fixed with the next rustup release I guess.

Yes, I think it would be fixed in the next release. Fixed by #3047

@anarelion
Copy link

Also, we need to provide proper stable URLs for downloads: See microsoft/winget-pkgs#95599

@gotounix
Copy link

gotounix commented Feb 15, 2023

So this should be fixed with the next rustup release I guess.

Yes, I think it would be fixed in the next release. Fixed by #3047

@hi-rustin Is it not fixed in the next version 1.25.2 ?

@Rustin170506
Copy link
Member

@hi-rustin Is it not fixed in the next version 1.25.2 ?

It does not. Because 1.25.2 is just a quick fix for a security issue.

@Rustin170506
Copy link
Member

1.26.0 was released. I suppose this issue should be fixed. I am going to close this issue and if you have more questions please feel free to comment.

@fbstj
Copy link

fbstj commented Apr 27, 2023

indeed v1.26.0 has worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fixed-next-release This issue will be fixed in the next release of rustup.
Projects
None yet
Development

No branches or pull requests

6 participants