microsoft / microsoft/winget-cli

Track "primary" AppsAndFeaturesEntry for better matching

Open
#2,186 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description of the new feature / enhancement

During the review for https://github.com/microsoft/winget-cli/pull/2137, @JohnMcPMS brought up the good point that winget currently doesn't have a way to know which uninstaller to run if a package creates multiple ARP entries. Most applications will have a certain ARP entry that runs an uninstaller that will remove everything the app installed, so that you don't have to go through the list and manually remove them one by one. This value also often is the one that we should probably use for tracking the "true" version number of the package, since it's typically the ARP entry for the main component of the app.

We need a way to tell winget which ARP entry to treat as the main one.

Proposed technical implementation details

There should be an addition to the AppsAndFeaturesEntries portion of the schema that allows the manifest author to denote a single ARP entry as the primary one, so winget knows which uninstaller to run (and when an upgrade is necessary).

  AppsAndFeaturesEntries:
  - DisplayName: Mozilla Maintenance Service
    DisplayVersion: 99.0.1
    Publisher: Mozilla
    ProductCode: MozillaMaintenanceService
  - DisplayName: Mozilla Firefox (x86 nb-NO)
    DisplayVersion: 99.0.1
    Publisher: Mozilla
    ProductCode: Mozilla Firefox 99.0.1 (x86 nb-NO)
    Primary: true
    ```

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 with the AppsAndFeaturesEntries schema and trace where these entries are matched for uninstall and upgrade decisions. Define how a single Primary entry is represented and verify that the selected entry controls the uninstaller and tracked version without changing the other entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.