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] fails to install the packs specified in the requirements section (regression from 2.0.1) #283

Closed
jkrech opened this issue Apr 10, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jkrech
Copy link
Member

jkrech commented Apr 10, 2024

Describe the bug
When installing the pack version NXP::EVK-MIMXRT1064_BSP@14.0.0 using this command:

cpackget add NXP::EVK-MIMXRT1064_BSP@14.0.0 -v

the expectation is that due to these <requirements>

<requirements>
    <packages>
      <package name="MIMXRT1064_DFP" vendor="NXP" version="14.0.0"/>
      <package name="CMSIS" vendor="ARM" version="5.6.0"/>
    </packages>
</requirements>

that if no pack version of NXP::MIMXRT1064_DFP >= 14.0.0 is already installed, the latest version listed in the .Web/index.pidx gets downloaded and installed.
(similarly for "ARM::CMSIS >= 5.6.0")

Note: cpackget version 2.0.1 correctly installs NXP::MIMXRT1064_DFP@18.0.0 being the latest public version in my ./Web/index.pidx.

To Reproduce
Steps to reproduce the behavior:

  1. Ensure that you do not have any of the packs NXP::EVK-MIMXRT1064_BSP@14.0.0 and NXP::MIMXRT1064_DFP installed
  2. cpackget add NXP::EVK-MIMXRT1064_BSP@14.0.0 -v
  3. See error:
D: Downloading https://mcuxpresso.nxp.com/cmsis_pack/repo/NXP.MIMXRT1064_DFP.18.0.0.pack to C:\Users\user\AppData\Local\Arm\Packs\.Download\NXP.MIMXRT1064_DFP.18.0.0.pack
D: Download not required, using the one from cache
I: Adding pack NXP.MIMXRT1064_DFP.
D: Installing "C:\Users\user\AppData\Local\Arm\Packs\.Download\NXP.MIMXRT1064_DFP.18.0.0.pack"
D: Validating pack
D: Inflating "NXP.MIMXRT1064_DFP.pdsc"
D: Ensuring "C:\Users\user\AppData\Local\Temp\vCGxspJRfM\" directory exists
D: Inflated 193693 bytes
D: Initializing PdscXML object for "C:\Users\user\AppData\Local\Temp\vCGxspJRfM\NXP.MIMXRT1064_DFP.pdsc"
D: Reading pdsc from file "C:\Users\user\AppData\Local\Temp\vCGxspJRfM\NXP.MIMXRT1064_DFP.pdsc"
D: Making sure  is the latest release in NXP.MIMXRT1064_DFP.pdsc
E: The latest release (18.0.0) in pack's pdsc (NXP.MIMXRT1064_DFP.pdsc) does not match pack version ""
E: pack version is not the latest in the pdsc file

Expected behavior
The expectation is that NXP::MIMXRT1064_DFP@18.0.0 gets successfully installed.

Environment (please complete the following information):

  • CMSIS-Toolbox 2.3.0
  • cpackget
  • OS: windows
  • Version 2.1.1
@jkrech jkrech changed the title [cpackget] fails to install the packs specified in the requirements section [cpackget] fails to install the packs specified in the requirements section (regression from 2.0.1) Apr 10, 2024
@jkrech jkrech added the bug Something isn't working label Apr 10, 2024
@jkrech
Copy link
Member Author

jkrech commented Apr 10, 2024

Looks like a duplicate of:
#282

edriouk added a commit that referenced this issue Apr 10, 2024
 [cpackget] fails to install the packs specified in the requirements section (regression from 2.0.1) #283
@edriouk
Copy link
Collaborator

edriouk commented Apr 10, 2024

Two problems have identified and fixed:

  1. cpackget internally uses "_" as unlimited upper range, e.g. "1.2.3:_"
    utils.SemverCompareRange() is updated to support it.
  2. pack.resolveVersionModifier() : swapped version and range arguments to call utils.SemverCompareRange()
    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
No open projects
Development

No branches or pull requests

3 participants