microsoft / microsoft/winget-cli

Update registry metadata for portable packages updated outside of WinGet.

Open
#6,479 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Upgrade Issue-Feature Portable
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Relevant area(s)

WinGet CLI

Description of the new feature / enhancement

Some "portable" packages have their own internal "update" mechanism. If they get updated, and they were installed by WinGet, the registry metadata doesn't get updated.

This could lead to undesired behavior.

WinGet thinks the package is out of date and needs to be updated.

  • This could be turned into a no-op. If the latest version WinGet knows about matches the installed version, WinGet could update the metadata during the "upgrade" flow.

  • This could lead to a bad outcome if a newer version is installed than what WinGet is aware of and could lead to an upgrade loop in WinGet. This may justify a new "error condition" because WinGet doesn't know how to reason about the installed version. It could also have the "unintended" behavior of installing an older version of the package and clobber the newer one that was installed on the device.

Ideally, the latest version would be available in the WinGet repository, or the portable package could leverage WinGet to handle the upgrade flow to keep the registry metadata in sync. Otherwise, it would be good for the package to distribute an installer rather than a "bare portable executable".

Tools like the Windows App CLI can help build an MSIX packaged application including the binary. This is the ideal case in terms of package management, as Windows understands how to handle the situation, and WinGet isn't trying to keep the registry metadata in sync.

Optionally there are a large number of other supported installer technologies that can be used to build installers.

Proposed technical implementation details

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the WinGet CLI upgrade flow and how it reads and updates registry metadata for portable packages. Review how the flow compares installed and repository versions, then identify the existing error conditions and tests involved. Done requires an agreed behavior for externally updated portable packages and coverage for avoiding incorrect downgrades or upgrade loops.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.