Repository navigation
Explain WinGet updates the publisher refuses and offer to ignore them - #5799
Open
Gabriel Dufresne (GabrielDuf) wants to merge 2 commits into
Open
Gabriel Dufresne (GabrielDuf) wants to merge 2 commits into
Gabriel Dufresne (GabrielDuf) wants to merge 2 commits into
Conversation
Packages such as MSYS2 publish `UpgradeBehavior: deny`, so `winget upgrade` always fails with 0x8A150114 (INSTALL_UPGRADE_NOT_SUPPORTED). UniGetUI still listed the update, showed a generic failure and offered retries that could never succeed (#5597). - Operation helpers gain `UpdateWasRefusedByPublisher`; the WinGet helper recognises 0x8A150114 and explains the failure through the existing `GetFailureExplanation` hook, so PackageOperations stays manager-agnostic. - A refused update hides that version through the stuck-update suppression (#5158), so automatic updates stop retrying it; a newer version is offered again. - The failure dialog's main action becomes "Ignore updates for this package", with Retry kept in its drop-down; the operation panel menu offers it too, "Retry failed" skips these operations, and IPC operation payloads carry `updateRefusedByPublisher`. - Ignoring updates goes through one `UpgradablePackagesLoader.IgnoreUpdatesAsync` helper, used by the dialog, panel, Updates page and TUI. It resolves the row the loader actually lists, so ignoring from another copy of the package removes the right row. Bundled Pinget does not enforce `UpgradeBehavior: deny` and runs the installer, so there is no Pinget refusal to detect. Verified against real WinGet with MSYS2 20260611 installed: winget returns 0x8A150114, the dev build shows the new message, sets the IPC flag and drops the update from the list, and the dialog's Ignore action works. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Persistent suppression is skipped when CLI listing reports an Unknown installed version, allowing a refused upgrade to reappear after reload and be retried every automatic-update cycle.
1 open issue
What changed in this PR
This PR addresses the failure-handling portion of #5597: explaining publisher-refused WinGet updates and offering an Ignore action. It reuses stuck-update suppression from #5158; filtering these updates before an attempt remains out of scope.
Changes:
- Detects WinGet error
0x8A150114, explains the refusal, and records version-specific suppression. - Adds Ignore actions, excludes refused updates from bulk retries, and exposes the refusal through IPC.
- Centralizes ignore-update handling and adds regression tests.
| File | Description |
|---|---|
| src/UniGetUI.Tui/Infrastructure/TuiPackageActions.cs | Delegates ignore actions to the shared loader helper. |
| src/UniGetUI.Tui/Infrastructure/TuiOperationRegistry.cs | Skips publisher-refused updates in bulk retries. |
| src/UniGetUI.PackageEngine.Tests/WinGetManagerTests.cs | Tests refusal detection, messaging, and suppression. |
| src/UniGetUI.PackageEngine.Tests/UpgradablePackagesLoaderTests.cs | Tests ignoring through another instance or without a listed update. |
| src/UniGetUI.PackageEngine.PackageManagerClasses/Manager/Helpers/BasePkgOperationHelper.cs | Provides default refusal detection. |
| src/UniGetUI.PackageEngine.PackageManagerClasses/Manager/Classes/NullPackageManager.cs | Implements the refusal contract for the null manager. |
| src/UniGetUI.PackageEngine.PackageLoader/UpgradablePackagesLoader.cs | Centralizes ignore persistence and listed-row removal. |
| src/UniGetUI.PackageEngine.Operations/PackageOperations.cs | Tracks refusals and exposes ignore/retry eligibility. |
| src/UniGetUI.PackageEngine.Managers.WinGet/Helpers/WinGetPkgOperationHelper.cs | Recognizes, explains, and suppresses refused updates. |
| src/UniGetUI.PackageEngine.Interfaces/ManagerHelpers/IPackageOperationHelper.cs | Adds the publisher-refusal detection contract. |
| src/UniGetUI.Interface.IpcApi/IpcOperationApi.cs | Exposes publisher refusal in operation payloads. |
| src/UniGetUI.Avalonia/Views/SoftwarePages/SoftwareUpdatesPage.cs | Uses shared ignore, skip, and pause handling. |
| src/UniGetUI.Avalonia/Views/DialogPages/OperationFailedDialog.axaml.cs | Makes Ignore the primary action for refused updates. |
| src/UniGetUI.Avalonia/ViewModels/DialogPages/OperationViewModel.cs | Adds Ignore to the operation menu. |
| src/UniGetUI.Avalonia/Infrastructure/AvaloniaOperationRegistry.cs | Excludes refused updates from desktop bulk retries. |
| src/Languages/lang_en.json | Adds the English refusal explanation. |
| docs/IPC.md | Documents the refusal flag and ignore command. |
Review effort: Balanced
When WinGet's CLI lists an update with an `Unknown` installed version, ParseAvailableUpdates skipped ConsumeAlreadyUpgradedSuppression entirely to keep the one-shot "already upgraded" mark from being cleared. That also skipped the persistent IsStuckUpgradeLoop check, which the COM listing paths apply unconditionally. A refused update (0x8A150114) therefore reappeared on the next CLI reload and automatic updates retried it every cycle. Unknown-version rows now still check IsStuckUpgradeLoop; only the one-shot mark is left alone. The bypass predates this branch (#5167) and also let #5158's stuck-update suppression slip through for such rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🤖 Pull request was approved automatically: the AI review is complete and all its review threads are resolved. 🎉
Integration Details
{
"deliveryId": "d4093270-e399-11f1-97d1-d2e21871d1d5",
"headSha": "930318f667649cd8bb252d12f5b4b03139dc12f6",
"reviewer": "copilot-pull-request-reviewer[bot]"
}This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Addresses #5597 (first part).
Problem
Packages such as MSYS2 declare
UpgradeBehavior: denyin their WinGet manifest.winget upgradealways refuses them with0x8A150114(APPINSTALLER_CLI_ERROR_INSTALL_UPGRADE_NOT_SUPPORTED), but UniGetUI kept listing the update, showed a generic failure, offered retries that can never succeed, and automatic updates retried it every cycle.Changes
UpdateWasRefusedByPublisher(defaultfalse). The WinGet helper recognises0x8A150114and explains it through the existingGetFailureExplanationhook: "WinGet cannot update {package}. Its publisher requires updating it another way, for example from within the app itself".updateRefusedByPublisher(documented indocs/IPC.md).UpgradablePackagesLoader.IgnoreUpdatesAsyncreplaces five copies of the ignore-and-remove sequence (dialog, panel, Updates page, TUI). It resolves the row the loader actually lists, so ignoring from another copy of the package removes the right row.Bundled Pinget doesn't enforce
UpgradeBehavior: deny(it runs the installer instead), so there's no Pinget refusal to detect.Not in this PR
The issue's other half: hiding these updates before anyone tries them, and keeping
RequireExplicitUpgradepackages out of "Update all". WinGet's COMIsUpdateAvailabledoesn't apply either flag, and it isn't yet known whether COM exposes them.Testing
WinGetManagerTests(message, refusal flag, bulk-retry skip, version hidden only until a newer one, no effect on installs) andUpgradablePackagesLoaderTests(ignore helper with another instance, and with nothing listed).WinGetManagerTests,UpgradablePackagesLoaderTests,PackageOperationsTests, the IPC operation tests and the TUI ignore/skip/pause E2E tests pass. Bothdotnet formatgates pass.winget upgradereturns0x8A150114. Updating through a dev build showed the new message, setupdateRefusedByPublisher, dropped MSYS2 from the update list after a reload, and the dialog's Ignore action worked in the UI.🤖 Generated with Claude Code