-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Specify whether a package is upgradable if already installed #3482
Comments
@pauby Is this the intended behavior for the MSI/(wix) package? |
We do have an installation notes field that could be used to let customers know they should perform upgrades via Chocolatey directly, and it would likely be best to figure out how to handle users who might have installed older versions of the MSI so WinGet doesn't end up in a state where the user is confused. |
I don't know how chocolatey is versioned, so it might also make sense to modify the name to indicate the package is the "Chocolatey Installer" or something like that. When users look in Windows Apps & Features they might be confused by thinking the version reported matches the version of Chocolatey itself. |
The Chocolatey CLI MSI is intended only for the installation of Chocolatey CLI. But the intention is not to break the installation for people who do upgrade via the MSI. It should either do the upgrade or not do the upgrade, and exit gracefully. At the moment it is broken. That's what we are going to look at for the next release (which is imminent). Until that time, we'll pick up any issues in the choco repository.
We'll look at updating that and I'll ask the team to reach out if we need more information on that. |
Awesome! If you want some additional options, you could look at "expected return codes". Then you could exit with a specific code and have a message reported to the user regarding the reason the install didn't "succeed", but that it is a known expected result. |
@denelon Paul asked me to take a look at the Chocolatey MSI. We've gone ahead and fixed it for upcoming versions, but we would like to update the InstallationNotes for the existing packages. Would the process for those be to open a single PR to update all of the manifests? Or would we need 3 PRs for the 3 different versions? Assuming of course that we're allowed to update the existing manifests. |
@corbob You would need 3 separate PRs as the CI pipelines can only validate a change in single manifest per PR.
Certainly so! |
just posting a note to add my experiences about the list of broken-on-update / misidentified packages: Discord.Discord - does self-updates and does not update the version number in the registry when doing so, applying an update via winget will break/override the user preferences and forcefully enable auto-start on system boot microsoft/winget-pkgs#90642 Mozilla.Firefox.DeveloperEdition - does self-updates and shows a "stable" version number in the registry even though actually the self-update installs a developer/beta version TeamViewer.TeamViewer - does self-updates and any upgrade applied (even via the self-update integrated one) will forcefully enable a system service with |
Is this actually solved by Related(?) PR: microsoft/winget-pkgs#122575 |
the explicit upgrade flag is not really helpful when the installer is badly designed in the first place, it only excludes the package from In the sample cases that i mentioned above (Discord, TeamViewer) even if the installer might behave as if it's doing an upgrade it actually deletes and/or overrides some user settings and resets them to defaults instead of doing an upgrade that preserves user preferences. In this matter the TeamViewer installer is actually a bit malicious on purpose - instead of a proper upgrade that preserves user preferences and service settings it wipes the service registered to run as |
i was looking through the Winget v1.6 changes and i see that in v1.6 we can now have The problem is that the validation pipelines are not prepared to parse this because there is currently no v1.6 manifest schema |
Fixed 😊 |
Description of the new feature / enhancement
Some packages do not support being upgraded by a newer installer, like Chocolatey (MSI, Wix).
Related issue over at choco:
choco.exe
after upgrading Chocolatey CLI using the MSI chocolatey/choco#3286Chocolatey in winget-pkgs repo:
Some context about Chocolatey
The Chocolatey MSI installer can be used for initial install only, upgrading should be done using
choco
itself.AFAIK there is no way Winget can successfully upgrade Chocolatey right now.
Proposed technical implementation details
UpgradeBehavior
touninstallPrevious
either.UpgradeBehavior
:no
,false
or similar?choco upgrade chocolatey
. Wait and check exit code for success.The text was updated successfully, but these errors were encountered: