Open trparky opened 2 years ago
We need to have a way to determine the architecture for a given installed package to upgrade architectures that aren't the default architecture on the system. The current logic looks at the architecture of the system to make the determination of the best architecture to install when the "--architecture <architecture>" isn't specified.
@trparky As a workaround you can specify the "--architecture" to get the x86 variations
The same feature need to be added to winget uninstall
command. For example, I can not uninstall Oracle.JavaRuntimeEnvironment because I have both x86 and x64 versions.
Simple repro that shows that winget upgrade
with --architecture
does not work either, as suggested by comment https://github.com/microsoft/winget-cli/issues/2243#issuecomment-1159015335. I originally posted this to #4810.
PS > winget install --silent --id Microsoft.DotNet.DesktopRuntime.6 --version 6.0.31 --architecture x64
Found Microsoft .NET Windows Desktop Runtime 6.0 [Microsoft.DotNet.DesktopRuntime.6] Version 6.0.31
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://dotnetcli.azureedge.net/dotnet/WindowsDesktop/6.0.31/windowsdesktop-runtime-6.0.31-win-x64.exe
██████████████████████████████ 55.0 MB / 55.0 MB
Successfully verified installer hash
Starting package install...
Successfully installed
PS > winget install --silent --id Microsoft.DotNet.DesktopRuntime.6 --version 6.0.33 --architecture x86
Found an existing package already installed. Trying to upgrade the installed package...
Found Microsoft .NET Windows Desktop Runtime 6.0 [Microsoft.DotNet.DesktopRuntime.6] Version 6.0.33
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://dotnetcli.azureedge.net/dotnet/WindowsDesktop/6.0.33/windowsdesktop-runtime-6.0.33-win-x86.exe
██████████████████████████████ 50.2 MB / 50.2 MB
Successfully verified installer hash
Starting package install...
Successfully installed
PS >
Now try to either upgrade or uninstall just x64.
PS > winget list Microsoft.DotNet.DesktopRuntime.6
Name Id Version Source
--------------------------------------------------------------------------------------------------
Microsoft Windows Desktop Runtime - 6.0.33 (x86) Microsoft.DotNet.DesktopRuntime.6 6.0.33 winget
Microsoft Windows Desktop Runtime - 6.0.31 (x64) Microsoft.DotNet.DesktopRuntime.6 6.0.31 winget
PS > winget upgrade --silent --id Microsoft.DotNet.DesktopRuntime.6 --architecture x64
No available upgrade found.
No newer package versions are available from the configured sources.
PS > winget install --silent --id Microsoft.DotNet.DesktopRuntime.6 --version 6.0.33 --architecture x64
Found an existing package already installed. Trying to upgrade the installed package...
No available upgrade found.
No newer package versions are available from the configured sources.
PS >
Output of winget upgrade --silent --exact --id Microsoft.DotNet.DesktopRuntime.6 --architecture x64
with WinGet v1.8.1911.
From the logs it does not seem like it differentiates on architecture? 🤔
Given how WinGet works right now it'd probably work better with one ID per architecture (Microsoft.DotNet.DesktopRuntime.6.x86
, Microsoft.DotNet.DesktopRuntime.6.x64
etc.).
Edit: Upgrade with full name seems to work, but look at what URL it fetches. 🤦♂️
PS > winget upgrade "Microsoft Windows Desktop Runtime - 6.0.31 (x64)"
Found Microsoft .NET Windows Desktop Runtime 6.0 [Microsoft.DotNet.DesktopRuntime.6] Version 6.0.33
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://dotnetcli.azureedge.net/dotnet/WindowsDesktop/6.0.33/windowsdesktop-runtime-6.0.33-win-x86.exe
██████████████████████████████ 50.2 MB / 50.2 MB
Successfully verified installer hash
Starting package install...
Successfully installed
PS >
Edit 2: Add --architecture
to previous command and it works.
PS > winget upgrade "Microsoft Windows Desktop Runtime - 6.0.31 (x64)" --silent --architecture x64
Found Microsoft .NET Windows Desktop Runtime 6.0 [Microsoft.DotNet.DesktopRuntime.6] Version 6.0.33
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://dotnetcli.azureedge.net/dotnet/WindowsDesktop/6.0.33/windowsdesktop-runtime-6.0.33-win-x64.exe
██████████████████████████████ 55.1 MB / 55.1 MB
Successfully verified installer hash
Starting package install...
Successfully installed
PS >
Please confirm these before moving forward
Category of the issue
Installation issue.
Brief description of your issue
When I execute "winget upgrade --all" it doesn't download the x86 version of the Microsoft.DotNet.DesktopRuntime.6 package which is installed side-by-side on x64-based installations.
Steps to reproduce
Execute "winget upgrade --all".
Actual behavior
It downloads the x64 version when it should be downloading the x86 version since both need to be updated.
Expected behavior
It should be downloading both the x86 and the x64 versions.
Environment
Screenshots and Logs
No response