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] Installed pack is not purgeable #224

Open
jkrech opened this issue Nov 10, 2023 · 1 comment
Open

[cpackget] Installed pack is not purgeable #224

jkrech opened this issue Nov 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jkrech
Copy link
Member

jkrech commented Nov 10, 2023

Describe the bug

  cpackget rm --purge ARM.CMSIS.6.0.0-dev53+g825ef36.pack

Fails to remove the pack version from .Download folder.

To Reproduce
Steps to reproduce the behavior:

  1. cpackget add https://github.com/ARM-software/CMSIS_6/releases/download/dev%2Fv6.0.0-dev53/ARM.CMSIS.6.0.0-dev53+g825ef36.pack
  2. cpackget rm --purge ARM::CMSIS@6.0.0-dev53+g825ef36
  3. See error:
I: Using pack root: "C:\Users\jkrech\AppData\Local\Arm\Packs" (default mode - no specific CMSIS_PACK_ROOT chosen)
I: Removing [ARM::CMSIS@6.0.0-dev53+g825ef36]
E: pack not purgeable

In verbose mode you can see the file name pattern match:
D: Listing files and directories in "C:\Users\jkrech\AppData\Local\Arm\Packs.Download" that match "ARM.CMSIS.6.0.0-dev53+g825ef36.(?:pack|zip|pdsc)"

Probably the . - + characters confuse the regular expression search.
I don't know why the tool does search for an exact filename?

Expected behavior
The pack version file is located in the .Download folder and must be removed:

Environment (please complete the following information):

  • OS: Windows
  • Version 10

Additional context
N/A

@jkrech jkrech added the bug Something isn't working label Nov 10, 2023
@jkrech
Copy link
Member Author

jkrech commented Nov 14, 2023

Semantic Versioning specifies that two versions that only differ after "+" (build meta information) are considered "identical".
This means the build meta information should be ignored.
When the user refers to a pack version with "+" is should only be considered if the user is specifying a file (filesystem or url).
It could make sense, to rename the pack version and strip the version after "+" in .Download. The pack version directory must not include "+1234".

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

2 participants