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] Explicit installation may fail #357

Open
ReinhardKeil opened this issue Oct 14, 2024 · 1 comment
Open

[cpackget] Explicit installation may fail #357

ReinhardKeil opened this issue Oct 14, 2024 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@ReinhardKeil
Copy link

ReinhardKeil commented Oct 14, 2024

Describe the bug

When installing a newly published pack, an error like this may appear.

cpackget add Keil::[email protected]
I: Adding pack "Keil::[email protected]"
E: pack version not found in the pdsc file

It works fine after the execution of cpackget update-index as covered in the documentation. However the UX experience could be better.

To Reproduce

Remove in the CMSIS_PACK_ROOT folder:

  • The folder Keil\B-U585I-IOT02A_BSP
  • The file .\Web\B-U585I-IOT02A_BSP.pdsc
  • From file .\Web\index.pidx the <pdsc url reference to B-U585I-IOT02A_BSP.

Execute: cpackget add Keil::[email protected]

As a user you get this line from the web portal, and you perhaps don't know that cpackget update-index should be executed first.

Expected Behavior

Execute: cpackget add Keil::[email protected] should install a published pack without errors.

This may require some changes.

  • Auto-update public index file when used but only once per day and when connection available #355 suggest to execute update-index --sparse once a day. This should be also executed when an explicit pack version is given and this pack version is not found in index.pidx as --sparse effectively only updates this file.
  • When the *.PDSC file of a pack is missing, but the index.pidx indicates the availablity, only this *.PDSC should be downloaded.
  • Then the normal pack installation should work.

Envrionment:

  • OS: Windows
  • cpackget 2.1.4
@jkrech
Copy link
Member

jkrech commented Oct 29, 2024

When installing a public pack, the index.pidx needs to be opened.
a) if index.pidx does not exist, invoke the behavior of cpackget init https://www.keil.com/pack/index.pidx -> bail out on error
b) if index.pidx exists - open index.pidx and read <timestamp>
c) if <timestamp> date is smaller than host date invoke behavior of capckget update-index --sparse -> bail out on error
d) now continue with the behavior of cpackget add packID, locating pack in index.pidx, downloading pdsc file if version in index is higher than version in pdsc file.
e) reading pdsc file <releases> section to find latest or specified version. If no version match found bail out.
f) read url attribute from release tag or construct download url from elements <url> <vendor> <name> version . pack

@jkrech jkrech moved this from Backlog to In progress in CMSIS-Toolbox 2.7.0 Nov 5, 2024
@jkrech jkrech added the enhancement New feature or request label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: In progress
Development

No branches or pull requests

3 participants