scripts/mkimg.arm.sh fails if APKINDEX don't exist
Hello,
I've been trying to build a custom rpi archive, but it seems to fail without a helpful error if the APKINDEX doesn't exist.
>>> mkimage-aarch64: --> rpi_blobs
gzip: invalid magic
/usr/bin/tar: Child returned status 1
/usr/bin/tar: Error is not recoverable: exiting now
After some debugging, the issue is in build_rpi_blobs()
, where apk fetch --quiet --stdout raspberrypi-bootloader
simply produces errors:
# apk fetch --stdout raspberrypi-bootloader
WARNING: Ignoring APKINDEX.00740ba1.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.d8b2a6f4.tar.gz: No such file or directory
Replacing the command by adding the --no-cache
flag fixes the issue.
I'm happy to raise a PR but I'm not sure what the proper solution is. In my opinion the --no-cache
flag shouldn't be there, and instead an error should come up explaining that the cache may not exists or something, so people don't waste their time with investigating this in the future.