[BUG] Chocolatey update reports success without upgrading when a saved version override targets the installed version

未关闭
#5,672 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp
领域
desktop, devtools

调研方向

Start with the Chocolatey update path that builds the upgrade arguments from the saved per-package options in InstallationOptions/Chocolatey.ghidra.json, where --version=12.0.4 and --allow-downgrade get added. Then find where the command's exit code is turned into the "updated successfully" message. Reproduce by saving a version override equal to the installed version and checking that the run reports zero upgraded packages. Done means a no-op upgrade is not reported as success and the conflict is shown to the user, and the chosen behaviour is agreed in the thread first.

由索引模型根据 Issue 内容生成。

描述

bug chocolatey priority: medium
Please confirm these before moving forward
  • I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
  • I have tested that this issue has not been fixed in the latest (beta or stable) release.
  • I have checked the FAQ section for solutions.
  • This issue is about a bug (if it is not, please use the correct template).
UniGetUI Version

2026.3.3

Windows version, edition, and architecture

Windows 11, build 26300 (10.0.26300.0); edition and architecture not collected

Describe your issue

Ghidra repeatedly appears in Software Updates as 12.0.4 -> 12.2.0. Clicking Update reports "Ghidra was updated successfully", but the installed version remains 12.0.4 and the update reappears after a scan.

The package has a saved installation option selecting Version 12.0.4. UniGetUI uses that old version for the update command even though the update list displays 12.2.0. Chocolatey performs no upgrade and exits successfully; UniGetUI then presents this as a completed update.

Expected: if a saved version override prevents an offered update, UniGetUI should clearly explain the conflict and avoid claiming the package was updated. It could skip the incompatible update or ask the user to change the version selection. A successful command that upgrades zero packages should not be presented as a successful package update.

Steps to reproduce the issue

Observed repeatedly with Chocolatey package ghidra:

  1. Have Ghidra 12.0.4 installed and a saved per-package version selection of 12.0.4.
  2. Scan for updates; UniGetUI offers Ghidra 12.2.0.
  3. Select Ghidra and click Update selection.
  4. UniGetUI runs the upgrade command with --version=12.0.4 --allow-downgrade.
  5. Chocolatey upgrades 0/1 packages and exits with code 0. UniGetUI reports "Ghidra was updated successfully".
  6. Scan again: Ghidra 12.0.4 -> 12.2.0 is offered again.
UniGetUI Log
Relevant operation-history details (sanitized excerpt):
Update options: Version: "12.0.4"; OverridesNextLevelOpts: True
Version: 12.0.4 -> 12.2.0
Arguments: upgrade ghidra -y --no-progress "--version=12.0.4" --allow-downgrade
Displayed result: Ghidra was updated successfully
Package Managers Logs
Chocolatey v2.5.0
Update detection: ghidra|12.0.4|12.2.0|false
Command: choco upgrade ghidra -y --no-progress "--version=12.0.4" --allow-downgrade
Result: ghidra v12.0.4 is the latest version available based on your source(s).
Chocolatey upgraded 0/1 packages.
Exit code: 0
Relevant information

Saved per-package configuration in InstallationOptions/Chocolatey.ghidra.json:

{
  "OverridesNextLevelOpts": true,
  "Version": "12.0.4"
}

The Version property has since been removed as a workaround. An actual upgrade after removing it has not yet been verified.

This report concerns the mismatch between update discovery, saved version selection, and success reporting in UniGetUI. No failure to download or install Ghidra 12.2.0 was observed, because that version was never requested by the generated command.

The origin of the saved version selection is unknown.

Duplicate search and FAQ review

Searched open and closed issues for Ghidra, version overrides, saved Chocolatey options, and successful updates that do not update the package. No exact duplicate of this saved Chocolatey version override scenario was found.

Related reports reviewed:

  • #4954: WinGet updates reported as not applicable were incorrectly reported as successful; fixed through #4998. Different package manager and trigger.
  • #5251: PowerShell 5.x module operation failures reported as success; fixed through #5309. Different package manager and failure mode.
  • #4696: Avalonia updates list failed to remove successfully updated Scoop packages; fixed in 2026.1.9. Here Chocolatey actually upgrades zero packages and a fresh scan still offers the update.
  • #5076: Updates could appear successful when a running application could not be closed; addressed in #5624. Different trigger.

Reviewed the README FAQ: it does not cover saved Chocolatey version overrides or successful no-op upgrades.

Screenshots and videos

No response

主要语言
C#
星标
26.8k
派生
970
平均合并
17 小时 47 分钟
30 天内合并 PR
126

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Devolutions/UniGetUI 的其他 Issue

查看 Devolutions/UniGetUI 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。