Skip to content

arduino-cli lib upgrade (re-)installs the same libraries multiple times #1516

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

Closed
josefwegner opened this issue Oct 18, 2021 · 2 comments · Fixed by #1580
Closed

arduino-cli lib upgrade (re-)installs the same libraries multiple times #1516

josefwegner opened this issue Oct 18, 2021 · 2 comments · Fixed by #1580
Assignees
Labels
conclusion: resolved Issue was resolved criticality: medium Of moderate impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@josefwegner
Copy link

josefwegner commented Oct 18, 2021

Bug Report

Current behavior

Arduino-cli installs the same libraries over and over:

$ arduino-cli lib upgrade
Downloading [email protected]...
[email protected] already downloaded
Downloading [email protected]...
[email protected] already downloaded
Downloading [email protected]...
[email protected] already downloaded
Downloading [email protected]...
[email protected] already downloaded
Downloading [email protected]...
[email protected] already downloaded
Installing [email protected]...
Already installed [email protected]
Installing [email protected]...
Already installed [email protected]
Installing [email protected]...
Already installed [email protected]
Installing [email protected]...
Already installed [email protected]
Installing [email protected]...
Already installed [email protected]

The cause seems that I have multiple cores installed:

arduino-cli core list
ID                  Installed Latest Name
arduino:avr         1.8.3     1.8.3  Arduino AVR Boards
arduino:mbed_nano   2.5.2     2.5.2  Arduino Mbed OS Nano Boards
arduino:mbed_rp2040 2.5.2     2.5.2  Arduino Mbed OS RP2040 Boards
arduino:sam         1.6.12    1.6.12 Arduino SAM Boards (32-bits ARM Cortex-M3)
ATTinyCore:avr      1.5.2     1.5.2  ATTinyCore
eHaJo:avr           2.2.0     2.2.0  eHaJo AVR Boards
MicroCore:avr       2.1.0     2.1.0  MicroCore
MightyCore:avr      2.1.3     2.1.3  MightyCore
MiniCore:avr        2.1.3     2.1.3  MiniCore
sandeepmistry:nRF5  0.7.0     0.7.0  Nordic Semiconductor nRF5 Boards

It does not happen if only the arduino:avr core is installed. I removed the ~/.ardunio15 directory:

$ arduino-cli update
Updating index: library_index.json.gz downloaded
Updating index: library_index.json.sig downloaded
Updating index: package_index.json downloaded
Updating index: package_index.json.sig downloaded
Updating index: package_index.json downloaded
Updating index: package_index.json.sig downloaded
Updating index: library_index.json.gz downloaded
Updating index: library_index.json.sig downloaded
$ arduino-cli upgrade
Downloading missing tool builtin:[email protected]...
builtin:[email protected] downloaded
Installing builtin:[email protected]...
builtin:[email protected] installed
Downloading missing tool builtin:[email protected]...
builtin:[email protected] downloaded
Installing builtin:[email protected]...
builtin:[email protected] installed
Downloading missing tool builtin:[email protected]...
builtin:[email protected] downloaded
Installing builtin:[email protected]...
builtin:[email protected] installed
$ arduino-cli core list
ID          Installed Latest Name
arduino:avr 1.8.3     1.8.3  Arduino AVR Boards
$ arduino-cli lib upgrade

After installing the arduino:mbed_nano core, the command starts installing the same library over and over:

$ arduino-cli core install arduino:mbed_nano
Downloading packages...
arduino:[email protected] downloaded
arduino:arm-none-eabi-gcc@7-2017q4 downloaded
arduino:[email protected] downloaded
arduino:[email protected] downloaded
arduino:[email protected] downloaded
arduino:[email protected] downloaded
Installing arduino:[email protected]...
arduino:[email protected] installed
Installing arduino:arm-none-eabi-gcc@7-2017q4...
arduino:arm-none-eabi-gcc@7-2017q4 installed
Installing arduino:[email protected]...
arduino:[email protected] installed
Installing arduino:[email protected]...
arduino:[email protected] installed
Installing arduino:[email protected]...
arduino:[email protected] installed
Installing platform arduino:[email protected]...
Configuring platform....
Platform arduino:[email protected] installed
$ arduino-cli lib upgrade
Downloading [email protected]...
[email protected] downloaded
Installing [email protected]...
Installed [email protected]
$ arduino-cli lib upgrade
Downloading [email protected]...
[email protected] already downloaded
Installing [email protected]...
Already installed [email protected]

Expected behavior

arduino-cli lib upgrade should not install the same libraries over and over when there is no update.

Environment

  • CLI version (output of arduino-cli version):
$ arduino-cli version
arduino-cli alpha Version: 0.19.3 Commit: 12f1afc2 Date: 2021-10-12T10:15:19Z
  • OS and platform:
    Raspberry Pi OS 32bit (Debian Buster)
$ uname -a
Linux raspberrypi 5.10.63-v7l+    #1459 SMP Wed Oct 6 16:41:57 BST 2021 armv7l GNU/Linux

Additional context

None.

@ubidefeo
Copy link

@josefwegner I'll verify this.
most of us have dozens of cores installed but I have not noticed this.
might be something introduced lately after some refactoring.

keep you posted
ubi

@ubidefeo ubidefeo added priority: medium Resolution is a medium priority type: bug labels Oct 19, 2021
@per1234 per1234 added type: imperfection Perceived defect in any part of project and removed type: bug labels Oct 20, 2021
@rsora rsora added criticality: medium Of moderate impact and removed priority: medium Resolution is a medium priority labels Nov 2, 2021
@josefwegner
Copy link
Author

Thank you very much. I just verified with arduino-cli 0.20.2-rc1 that this issue has been indeed fixed.

@per1234 per1234 added conclusion: resolved Issue was resolved topic: code Related to content of the project itself labels Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved criticality: medium Of moderate impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants