Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cpackget] must strip meta data from version #268

Closed
edriouk opened this issue Mar 7, 2024 · 4 comments · Fixed by #275
Closed

[cpackget] must strip meta data from version #268

edriouk opened this issue Mar 7, 2024 · 4 comments · Fixed by #275
Assignees
Labels
bug Something isn't working

Comments

@edriouk
Copy link
Collaborator

edriouk commented Mar 7, 2024

Describe the bug
Currently cpackget does not remove meta data information from versions before comparison and processing.
According to Semantic Versioning, meta-data located after '+' character should be ignored.

To Reproduce
Steps to reproduce the behavior:

  1. Run the cpackget with the following args
    cpackget add ARM::CMSIS@6.0.0
    That installs ARM::CMSIS@6.0.0 pack or says it is already installed
  2. Repeat command with the following command line:
    cpackget add ARM::CMSIS@6.0.0+meta
    This command fails with the following output:
I: Adding pack "ARM::CMSIS@6.0.0+meta"
E: pack version not found in the pdsc file

Expected behavior
Executing cpackget add ARM::CMSIS@6.0.0+meta command should succeed and install ARM::CMSIS@6.0.0 pack or report it is already installed.

see also related problem #224

@jkrech
Copy link
Member

jkrech commented Mar 12, 2024

a) the PACK.xsd schema support meta data in the version string
b) the version specified within the pdsc file always needs to match the version specified by the pack file, including meta data part
c) meta data does not allow "ordering" of packs that only differ in the meta information
d) when creating the installation directory cpackget should create a version folder without the meta data
As a consequence two packs only differing in the meta information will be treated as "identical" and installed into the same directory.
e) the tools reading the pdsc file will also ignore/strip the meta information from the version
f) is it meaningful to allow specifying the meta information in the CMSIS csolution project format?
g) is it meaningful to list the meta information of a pack version in cbuild.yml and cbuild-pack.yml?

@edriouk
Copy link
Collaborator Author

edriouk commented Mar 18, 2024

Fixed in PR #273

@edriouk edriouk closed this as completed Mar 18, 2024
@jkrech jkrech assigned edriouk and unassigned thorstendb-ARM Mar 18, 2024
@jkrech jkrech moved this to Done in CMSIS-Toolbox 2.3.0 Mar 18, 2024
@jkrech jkrech moved this from Done to In Progress in CMSIS-Toolbox 2.3.0 Mar 19, 2024
@jkrech jkrech reopened this Mar 19, 2024
@jkrech
Copy link
Member

jkrech commented Mar 19, 2024

Validation fails.

edriouk added a commit that referenced this issue Mar 19, 2024
@jkrech jkrech linked a pull request Mar 20, 2024 that will close this issue
edriouk added a commit that referenced this issue Mar 20, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in CMSIS-Toolbox 2.3.0 Mar 20, 2024
@jkrech
Copy link
Member

jkrech commented Mar 22, 2024

Validated the build successfully: https://github.com/Open-CMSIS-Pack/cpackget/actions/runs/8355669787

1.0.0-dev0 installs into directory: 1.0.0-dev0
1.0.0+meta0 installs into directory: 1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants