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

`wingetcreate update` does not parse and detect version

Open vedantmgoyal9 opened this issue 4 years ago • 5 comments

Brief description of your issue

When running wingetcreate.exe update <package-identifier> -u <installer-url> --submit, wingetcreate updates the latest manifest instead of detecting version from the installer and creating a new version directory and creating a new fresh manifests there.

Steps to reproduce

  1. Run the above command.
  2. wingetcreate modifies latest existing manifest.

Expected behavior

Ideally, wingetcreate should detect version from the installer, create a new version directory, create new manifests, get metadata from previous manifests, add installer entry and finally submit.

Actual behavior

wingetcreate modifies the latest manifests and submits PR (when --submit flag is specified.)

Environment

Windows Manifest Creator v0.4.0.3

vedantmgoyal9 avatar Sep 25 '21 17:09 vedantmgoyal9

@denelon can this issue be a top priority? I wanted to build some automation but this is stopping me from doing that.

vedantmgoyal9 avatar Sep 25 '21 17:09 vedantmgoyal9

It does automatically parse it if you run ~~wingetupdate -i~~ wingetcreate update -i, not that that helps.

I think the "problem" (with massive quotes as this is a feature request) is that the only thing that sets version in a non-interactive run is DeserializeManifestContentAndApplyInitialUpdate, which runs before the installer nodes are fixed. You'd basically have to run that function again (or another function that just changes the version number everywhere) after the installers are parsed.

I don't know what you'd do if two installers were passed and they both had different version numbers (besides, I guess, throw an exception), and the version numbers given in the installer often (except for non-MSIs) do not equal what the version number is in the ARP table. And many installers (like Burn) can't be parsed for everything we need automatically. Until schema 1.1 frees us from that mess, I don't know if this is that important.

jedieaston avatar Sep 27 '21 01:09 jedieaston

It does automatically parse it if you run wingetupdate -i, not that that helps.

image

vedantmgoyal9 avatar Sep 27 '21 02:09 vedantmgoyal9

maybe they meant wingetcreate update -i ?

Masamune3210 avatar Sep 27 '21 04:09 Masamune3210

Yes, I did. Thanks @Masamune3210.

jedieaston avatar Sep 27 '21 12:09 jedieaston