Skip to content

Conversation

@bgn42
Copy link
Collaborator

@bgn42 bgn42 commented Apr 6, 2025

Fixes

Changes

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

@jkrech jkrech requested a review from soumeh01 April 7, 2025 05:22
@jkrech
Copy link
Member

jkrech commented Apr 7, 2025

@bgn42 there seems to be an implied change here. I cannot run the update command without specifying a packID or a -f packlist.txt

>cpackget update
E: bad pack name: it must be either a PackID:  packVendor::Pack[@version|@~version|@^version|@>=version] or a local Pack file: <path>/Vendor.Pack.version.pack or a local Pack Description file: <path>/Vendor.Pack.pdsc

According to the help this should work. Please check.

$ cpackget update

  Use this to update all installed packs to the latest version

When I run

cpackget update Keil::STM32F2xx_DFP
I: Updating public index
I: Downloading index.pidx...
I: 100% |██████████████████████████████████████████████████████████████████████████████| (216/216 kB, 322 kB/s)
I: Updating PDSC files of public packs
I: EdgeImpulse::EI-SDK has a new version "1.71.22", previous was "1.71.0"
I: Downloading EdgeImpulse.EI-SDK.pdsc...
I: 100% |█████████████████████████████████████████████████████████████████████████████████| (60/60 kB, 15 MB/s)
I: Downloading Keil.STM32F2xx_DFP.pdsc...
I: 100% |████████████████████████████████████████████████████████████████████████████████| (85/85 kB, 258 kB/s)

It downloads the pdsc file but does not print a message that the latest pack version is already installed and therefore does not need to install anything.

cpackget rm --purge Keil::STM32F2xx_DFP
I: Removing [Keil::STM32F2xx_DFP]
I: Downloading Keil.STM32F2xx_DFP.pdsc...
I: 100% |████████████████████████████████████████████████████████████████████████████████| (85/85 kB, 253 kB/s)

When removing an installed pack, why would we need to download the pdsc file again?

>cpackget update ARM::CMSIS
I: Downloading ARM.CMSIS.pdsc...
I: 100% |████████████████████████████████████████████████████████████████████████████████| (43/43 kB, 256 kB/s)

We seem to be downloading the pdsc file, even if the version in the pdsc file in .Web are the same as in the index.pidx? Is there a bug in the version comparison?

bgn42 added 2 commits April 13, 2025 19:20
show message, that apack to be updated already was installed
@bgn42 bgn42 requested a review from jkrech April 13, 2025 19:28
@jkrech
Copy link
Member

jkrech commented Apr 14, 2025

  1. cpackget update now works without specifying a pack
  2. cpackget update Keil::STM32F2xx_DFP prints
I: Pack "Keil::STM32F2xx_DFP" is already installed

which is better but not yet ideal:

I: Pack "Keil::STM32F2xx_DFP@<version>" is the latest pack version and is already installed
  1. cpackget rm --purge Keil::STM32F2xx_DFP
    This command feels really slow now. I do appreciate that the local_repository.pidx needs to be read, but why reading the index.pidx.
    The tool needs to check whether the folder $CMSIS_PACK_RTOOS\Keil\STM32F2xx_DFP exists and delete the folder and the corresponding pack in the .Download.

  2. When is the message:

E: pack not purgeable

printed? Assuming that it is printed when the pack is not found in .Download is not considered an error. If the file exists and it is removed an info message makes sense.

@bgn42
Copy link
Collaborator Author

bgn42 commented Apr 14, 2025

Changed update and rm --purge messages.

It is not easy to remove reading of index.pidx because it is a central function of cpackget always together with local_repository.pidx. But I'll try that with the next pull request.

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit e30eb34 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 51.4% (50% is the threshold).

This pull request will bring the total coverage in the repository to 56.3% (-0.1% change).

View more on Code Climate.

Copy link
Member

@jkrech jkrech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bgn42 bgn42 merged commit 959ed79 into main Apr 22, 2025
19 of 20 checks passed
@bgn42 bgn42 deleted the updateWithPidx branch April 22, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants