Open ReinhardKeil opened 3 weeks ago
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
Describe the bug
When installing a newly published pack, an error like this may appear.
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:
<pdsc url
reference toB-U585I-IOT02A_BSP
.Execute:
cpackget add Keil::B-U585I-IOT02A_BSP@2.0.0
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::B-U585I-IOT02A_BSP@2.0.0
should install a published pack without errors.This may require some changes.
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 inindex.pidx
as--sparse
effectively only updates this file.*.PDSC
file of a pack is missing, but theindex.pidx
indicates the availablity, only this*.PDSC
should be downloaded.Envrionment: