Subject: cache sync breaking system

From: Kevin Garman <[email-masked]>
Date: Sat, 20 Jul 2024 14:39:54 +0000

Hi,

I'm having a problem with the APK cache on a diskless system where, after running "apk cache -v sync", my system no longer boots.  My APK repos are:

http://dl-cdn.alpinelinux.org/alpine/v3.20/main
http://dl-cdn.alpinelinux.org/alpine/v3.20/community

...and as I understand it, the APKINDEX files in the cache contain the first part of the sha1sum from those repo paths....so:

00d9131bdd6c2cb837ba0e8d458334d7fe1478cd
0eed2849cb1f6c99e60977f6bed7c9151f671a1a

APKINDEX.00d9131b.tar.gz
APKINDEX.0eed2849.tar.gz 

....would be the corresponding checksums and files.

In my cache I see:

APKINDEX.00d9131b.tar.gz
APKINDEX.0eed2849.tar.gz 
APKINDEX.ac462784.tar.gz
APKINDEX.ced93634.tar.gz

....so the expected files are there, and what I assume are old files as well.  System reboots and run fine.

Next I run "apk cache -v sync" to clean up and download cached files and now my cache only has these APKINDEX files:

APKINDEX.ac462784.tar.gz
APKINDEX.ced93634.tar.gz

Upon rebooting, package installation seems to complete and then it stops at:

can't run '/sbin/openrc': No such file or directory
can't run '/sbin/openrc': No such file or directory
can't run '/sbin/openrc': No such file or directory

(none) login:

Any help would be greatly appreciated!

Thanks,
Kevin