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] Unable to download a pack file that contains the build identifier #385

Open
Torbjorn-Svensson opened this issue Nov 19, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Torbjorn-Svensson
Copy link

Torbjorn-Svensson commented Nov 19, 2024

Describe the bug

Imagine a pack index file that contains a pack and the pack file contains the build identifier. Example:

<pdsc url="https://www.keil.com/pack/" vendor="ARM" name="CMSIS" version="6.1.0+foo" />

Then we try to install it using cpackget:

cpackget add --verbose ARM::CMSIS@6.1.0+foo

The command would generate output that ends with:

D: bad status: 404
E: "https://www.keil.com/pack/ARM.CMSIS.6.1.0.pack": bad request

But it should try to download https://www.keil.com/pack/ARM.CMSIS.6.1.0+foo.pack instead.
In the .pdsc file embedded in the .pack file, the release node is:

  <releases>
    <release date="2024-02-30" version="6.1.0+foo">
      the change log entries...
   </release>
  </releases>

To Reproduce
See above.

Expected behavior
The pack file should be downloaded.

Environment (please complete the following information):

  • OS: any
  • Version 2.1.4?

Additional context
Obviously, we did not see the problem with the ARM.CMSIS.6.1.0 pack, but an internal pack. The steps above should highlight the question regardless of the pack name.
The .pack files is named including the metadata/build identifier on the server.

@Torbjorn-Svensson Torbjorn-Svensson added the bug Something isn't working label Nov 19, 2024
@jkrech jkrech self-assigned this Nov 20, 2024
@jkrech jkrech moved this to Backlog in CMSIS-Toolbox 2.7.0 Nov 26, 2024
@jkrech
Copy link
Member

jkrech commented Nov 26, 2024

When installing a pack file from disk with meta information in the version:
ARM.CMSIS.6.0.0-dev35+geb1d42a.pack
the file will be stored in .Download without meta information
${CMSIS_PACK_ROOT}/.Download/ARM.CMSIS.6.0.0-dev35.pack
the content of the pack version will be extracted into a version folder without meta information
${CMSIS_PACK_ROOT}/ARM/CMSIS/6.0.0-dev35/

The pdsc file contains the meta information in the <release> attribute
<release version="6.0.0-dev35+geb1d42a">
however the tools reading pdsc files must ignore the meta information.

*.cbuild-pack.yml:

  resolved-packs:
    - resolved-pack: ARM::CMSIS@6.0.0-dev35
      selected-by-pack:
        - ARM::CMSIS@6.0.0-dev35+geb1d42a

The schema of PackIndex.xsd as well as the schema of PACK.xsd support version including meta information.

Therefore the current limitation needs to be corrected.

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
Development

No branches or pull requests

3 participants