winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Introduce a key for safely self upgradable packages

Open LantosIstvan opened this issue 5 years ago • 1 comments

Description of the new feature/enhancement

This feature request closely related to: https://github.com/microsoft/winget-cli/issues/120 https://github.com/microsoft/winget-cli/issues/223 https://github.com/microsoft/winget-cli/issues/405

There are programs which can be safely self upgrade itself, like Node.js.

Until there will be a solution for upgradable packages, this will make it possible to upgrading some of the packages, which installers already taken care of this problem.

Proposed technical implementation details (optional)

My suggestion is to introduce a key, which is turned off globally by default. Those programs whose tested that they can be safely upgraded, their YAML should have a key like:

Upgradable: true

I also suggesting that if the package is a single executible (like Terraform), than this should be also tested and turned on.

LantosIstvan avatar Jun 08 '20 20:06 LantosIstvan

@DJviolin We have been looking at this scenario. Your suggestion is very similar to what we are thinking in terms of a key in the manifest providing a hint to the client about the package that has been installed.

denelon avatar Jun 11 '20 22:06 denelon

We added the following key to the schema to help with packages that upgrade themselves. When WinGet sees this present in the manifest, the default behavior for winget upgrade --all is to skip this package. The argument "--include-explicit" would allow WinGet to upgrade packages known to upgrade themselves.

https://github.com/microsoft/winget-cli/blob/83cd0dcaddd31cc64570422b081f7743a79dc10d/schemas/JSON/manifests/v1.5.0/manifest.installer.1.5.0.json#L433-L436

denelon avatar Jun 12 '23 17:06 denelon