Skip to content

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

Closed
@josefwegner

Description

@josefwegner

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions