MCUdude / MegaCoreX

An Arduino hardware package for ATmega4809, ATmega4808, ATmega3209, ATmega3208, ATmega1609, ATmega1608, ATmega809 and ATmega808
GNU Lesser General Public License v2.1
247 stars 52 forks source link

Incorrect checksum format in paxkage index JSON #154

Closed jgromes closed 2 years ago

jgromes commented 2 years ago

Hi,

when running a CI on one of my projects, I'm getting the following error when attempting to install MegaCoreX using arduino-cli:

Installing arduino:avr-gcc@7.3.0-atmel3.6.1-arduino7...
arduino:avr-gcc@7.3.0-atmel3.6.1-arduino7 installed
Error during install: Cannot install tool MegaCoreX:avrdude@7.0.0-arduino2: testing local archive integrity: testing archive checksum: invalid checksum format: 03f29bae3b53ac1a0e469c1e79f1696a572d7be632838484526674501de0248e

Looking at the package index JSON file, I noticed that one of the checksums format is different:

{
              "size": "617568",
              "checksum": "SHA-256:ff0b5274182ffacbdea72cab24cb74e8f4b81bc654a4539bbcaa5445825b5b6d",
              "host": "x86_64-apple-darwin12",
              "archiveFileName": "avrdude_7.0-arduino.2_macOS_64bit.tar.gz",
              "url": "http://downloads.arduino.cc/tools/avrdude_7.0-arduino.2_macOS_64bit.tar.gz"
            },
            {
              "size": "989218",
              "checksum": "03f29bae3b53ac1a0e469c1e79f1696a572d7be632838484526674501de0248e",
              "host": "x86_64-linux-gnu",
              "archiveFileName": "avrdude_7.0-arduino.2_Linux_64bit.tar.gz",
              "url": "http://downloads.arduino.cc/tools/avrdude_7.0-arduino.2_Linux_64bit.tar.gz"
            },
            {
              "size": "1002537",
              "checksum": "SHA-256:97ed291b15dc421124c279ab9bf25d8a30e82d495ef2b4c41febb7f2d8f59c01",
              "host": "i686-linux-gnu",
              "archiveFileName": "avrdude_7.0-arduino.2_Linux_32bit.tar.gz",
              "url": "http://downloads.arduino.cc/tools/avrdude_7.0-arduino.2_Linux_32bit.tar.gz"
            },

For x86_64-linux-gnu, the "SHA-256:" prefix seems to be missing, is that intended?

MCUdude commented 2 years ago

Thank for reporting! The missing SHA-256: is absolutely the issue. I've fixed this in 1d4bebc. Please delete the downloaded JSON boards manager file and try again

jgromes commented 2 years ago
Installing MegaCoreX:avrdude@7.0.0-arduino2...
MegaCoreX:avrdude@7.0.0-arduino2 installed

Seems like it worked, luckily it was as simple as re-running the job. Thanks!