Closed fred-r closed 2 years ago
Hi @fred-r , shouldn't there be a 0.1.1
version on your pdsc file? I only see 0.1.0-alpha1
and 0.0.1
.
Yes, that's the content of the local pack's pdsc, but the content of the .pack's pdsc is like this:
<releases>
<release version="0.1.1" date="2022-03-17">
Add component for TIMER code generation
</release>
<release version="0.1.0-alpha1" date="2022-03-08">
Add condition for devices supporting GFX
</release>
<release version="0.0.1-alpha1" date="2022-03-01">
Initial release with HAL/LL drivers
</release>
</releases>
Looks like the local one takes precedence over the one I try to install.
cpackget.exe pack add C:/Packs/STMicroelectronics.STM32U5xx_DFP.0.1.1.pack
I am struggling to understand the discussion. My expectation with the above command is, that the pack gets installed into c:\CMSIS_PACKS\STMicroelectronics\STM32U5xx_DFP\0.1.1 If that folder already exists, then the version is already installed.
On local packs (packs which are not public = in .Web folder but in .Local) we should not have strict versioning expectations, especially if the
Indeed:
cpackget rejected the installation saying the version does not exist in my pdsc.
To make it work, I removed the reference to the local pack in "local_repository.pidx".
So, I think that cpackget parsed the pdsc from the .Local instead of parsing the pdsc from the .pack I was trying to install.
@fred-r I actually missed the fact that you referred to a "local_repository.pidx" when you wrote "Local Pack". It does not change the fact that cpackget should always install a pack which is referenced from the file system. Even if the same version (or other versions) are listed in the local_repository.pidx. If the same pack version is installed and also available as a local_repository entry, the local_repository entry will take precedence and the installed pack version being ignored.
Hi @fred-r, @jkrech I confirmed that in the code.
Cpackget hasn't yet extracted the current pack's pdsc file when checking if the version is present in an existing pdsc file.
Let me fix that
Hi @chaws , I don't see the purpose of checking for the version you want to install needing to be in an existing pdsc file? What am I missing? Are you looking for an inconcistency between the version the filename is suggesting and the contained pdsc file you are going to extract into the installation folder?
@jkrech this is a sanity check/assertion: the version you're trying to install via pack file should be present in the pack's pdsc file. The issue here is that cpackget is using an old pdsc file for the validation.
cpackget.exe pack add C:/Packs/STMicroelectronics.STM32U5xx_Drivers.0.1.2.pack I: Using pack root: "C:\CMSIS_PACKS" E: The pack's pdsc (C:\CMSIS_PACKS.Local\STMicroelectronics.STM32U5xx_Drivers.pdsc) has no release tag matching version "0.1.2" E: pack version not found in the pdsc file
In fact I really need to clean the .Local, updating local_repository.pidx did not work finally.
trying this:
I have this in my local pack's pdsc: