microsoft / microsoft/winget-pkgs
[New Feature]: Pipeline Package Validation Step - ProductCode Validation
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 11.1k
- Forks
- 9.7k
- Avg merge
- 1h 32m
- Merged PRs (30d)
- 376
Description
Description of the new feature/enhancement
What I think we need in the automated validation pipeline is a check that the productcode in the provided manifest does indeed match the registry key or uninstallstring/modifypath value in the registry (or some other smarter way of doing this). It doesn't make sense to permit a manifest that isn't valid.
I have observed at least twice now that when running winget update Author.Package that winget won't allow an update to occur due to "A newer version was found, but the install technology is different from the current version installed.". This is incredibly annoying.
What I just found (one example of probably many in the wild) is that in this commit, I explicitly set the productcode value to what it needs to be in order for uninstalls to work.
In this commit/update however, the next package maintainer did not do this. I think this could be at least part of the problem, as (speculation begins here) winget is detecting at update time that the product code in the manifest for the currently installed version does not match the one in the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\), which leads to the false positive.
I have vague memories of this being a problem I encountered when updating the package to 3.10.
Proposed technical implementation details (optional)
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by investigating the automated validation pipeline and how manifest productcode values are checked against Windows registry values. Compare the two linked package changes and define completion as validation that rejects manifests whose productcode does not match the relevant registry key, uninstallstring, or modifypath.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100