Choco automatic architecture choice is problematic when upgrading
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
### What You Are Seeing?
TeamViewer package failed to upgrade because x64 was added as a possibility to it. Earlier x86 was installed in the system.
See https://github.com/pauby/ChocoPackages/issues/149 for more info. But it could be problematic with any package that adds x64 at a later point, potentially even more. Lack of predictable continuity may also be bad for users who just want to keep the x86 version because it's e.g. for some reason faster or more robust.
### What is Expected?
Option 1: Upgrading should simply use the installer of the same architecture that was initially installed in choco, if installer for that architecture is still available.
Option 2: Upgrading should ask if installer of the same or newly added architecture should be used, then add `--x86` to preserved installer arguments if that was chosen. But e.g. in choco GUI, with how it's implemented now, it would result to defaulting to option 1 anyways, so not too sure this option is needed.
### How Did You Get This To Happen? (Steps to Reproduce)
1. TeamViewer was installed through choco around half year ago with x86 as only option.
2. I upgraded yesterday to a version that had x64 included as an option.
3. The upgrade failed due to installer `2` error, which means that there can be only one TeamViewer architecture version installed. Manual uninstallation of x86 version was needed to get rid of the error.
### System Details
* OS Build (In PowerShell run `[System.Environment]::OSVersion.version.tostring()`): 10.0.19044.0
* Windows PowerShell version (Run: `$PSVersionTable`): 5.1.19041.1682
* Chocolatey version (Run `choco --version`): 1.1.0
### Output Log
I don't think it's any helpful to complement the description.
Contributor guide
Research direction
Start by reproducing the upgrade from an x86-only TeamViewer installation to a version that also offers x64, using the reported Chocolatey and PowerShell environment. Trace the automatic architecture selection and preserved installer arguments. Done means an upgrade keeps the originally installed architecture when available, or clearly implements the chosen alternative behavior without requiring manual uninstallation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100