-
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
Add option to install only packages with unknown version (replace them with winget version) #2472
Comments
When looking at the output, the "Version" column will display the version reported in the registry, or the packageVersion from the manifest if there is a matching manifest configured to use the "marketing" version. If you see a "<" symbol, it means the installed version is lower than any "marketing" version we have a manifest for. When you see "Unknown", it means the software version isn't being reported by the package in the registry, so we don't have a way to reason about the installed version. Even if the source has a manifest which displays an "Available" version in It's always possible to |
The problem I have is that winget upgrade --all is broken anyway in that it downloads and reinstalls the same known version packages again and again (including huge ones like Unity), whereas I'd like to focus on the ones that are detected but with "unknown" version to winget. Seems to be impossible to ignore the other (of known version) packages and focus just on those with "unknown" version (either list or upgrade just those). |
I'd call that a "bug", and it could be related to the installers not writing the correct entries into Apps & Features (via the registry) or dealing with "side by side" packages where the newer one is installed in addition to the older one and we don't check to see if the latest one is already installed (we're working on that now).
I see more value in getting those "Unknown" version packages fixed by the publisher rather than add an "--only-unknown" argument to "upgrade". I'm not sure about the long-term value of doing that vs. just listing them out with "--include-unknown" and running |
Is there some documentation on how WinGet detects those "unknown version" installations? Do the publishers of packages prescribe (declaratively I guess) how they are detected and how the "version" (when something has been installed outside of winget) is fetched? |
Unknown version is shown when there is no ProductVersion set in the registry for that application. As to how they are fetched when trying to upgrade them, it's the same as any app, the link is in the manifest with the reported version. It's up to the installer itself to set the ProductVersion though, so if it doesn't, it appears to WinGet that it was never upgraded |
Description of the new feature / enhancement
I see these options:
--all Update all installed packages to latest if available
--include-unknown Upgrade packages even if their current version cannot be determined
but not an option
--only-unknown Upgrade packages when their current version cannot be determined
that I could combine with --all (or with some selection filter)
Proposed technical implementation details
I would like to have an option where for security concerns I'd like to replace packages with unknown version with their winget versions.
Also when doing list I'd like an option that shows only packages with unknown versions, not sure if there's such option currently (guess the above one would do when combined with "-list")
The text was updated successfully, but these errors were encountered: