chocolatey / chocolatey/choco

new pin option for "present"

Open
#2,959 4 comments 0 reactions 0 assignees View on GitHub
0 - Triaging Enhancement
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

### Checklist

- [X] I have verified this is the correct repository for opening this issue.
- [X] I have verified no other issues exist related to my request.

### Is Your Feature Request Related To A Problem? Please describe.

choco pin allows you to suppress upgrades which is fantastic!
I would like to change an installed package version from 1.2.3.4 -> 'present' or 'unmanaged' and not have it represented by a version number.

### Describe The Solution. Why is it needed?

Sometimes packages are installed on a system 1x, as sort of a stem cell implementation, and become self updating packages.
The choco package no longer properly identifies with the package installed, and in some of these edge cases, it's fine - we don't care what package is installed anymore, just that it is installed.

I would like to be able to simply change a package to 'present' and effectively not report a stale package but leave it dormant.
From a choco upgrade, I think it would skip these (as handled by pinning)
From a choco upgrade force, maybe it would update them?
I am open to behaviorial changes, and not sure I care. I just think reporting them as a stale version is a poor experience, that can be corrected with user intervention.

### Additional Context

In these edge cases, I am not concerned about getting the real version by means of ARP, regkey or other inspection methods.
Just clarifying what choco list knows, and REALLY knows

It's almost like an additional metadata piece to C:\programdata\chocolatey\lib\package.ver to signal it is obsolete.

### Related Issues

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing the choco pin, choco upgrade, and choco list entry points, then inspect how C:\programdata\chocolatey\lib\package.ver is used. Clarify whether a present or unmanaged state should be skipped by normal and forced upgrades, and define how list reports it before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.