Open-CMSIS-Pack / cpackget

Open-CMSIS-Pack Package Installer
Apache License 2.0
24 stars 15 forks source link

[cpackget] add a command that installs a minimum version of a pack #298

Closed jkrech closed 4 months ago

jkrech commented 6 months ago

Describe The Problem To Be Solved In the CMSIS Solution YAML input minimum versions of a pack can be specified. When running cbuild ... --packs it is required to support an option in cpackget to express a minVersion.

A Solution A straight forward approach would be to use the same syntax on the command line of cpackget as in the YAML input format: https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/YML-Input-Format.md#pack-name-conventions

a) <vendor>::<packname>@>=<version> At the command line the > is interpreted as redirect unless we put it in "quotes". b) <vendor>::<packname>@~<version> We should also consider~to allow matching only@~.or@~` parts of the version

Related with: https://github.com/Open-CMSIS-Pack/cpackget/issues/236

jkrech commented 4 months ago

a) cpackget add "<vendor>::<packname>@>=version" if no pack version greater or equal version is installed, the latest version of the pack is installed. b) cpackget add "<vendor>::<packname>@^version" if no pack version greater or equal version with the same major version (compatible pack version) is installed, the greatest available version with the same major version of the pack is installed.

Note: The latest version is defined by the CMSIS_PACK_ROOT/,Web/index.pidx. Run cpackget update-index to ensure that index file is up-to-date.

Implemented in: https://github.com/Open-CMSIS-Pack/cpackget/releases/tag/v2.1.3