`apk add ...` should attempt to redownload an apk package with a bad signature at least once during the command run
apk add ...
should attempt to redownload an apk package with a bad signature at least once during the command run. Instead it just gets stuck dumbfounded and always gives the same failed output even if the command is rerun:
$ sudo apk add py3-pip
(1/12) Installing py3-contextlib2 (21.6.0-r2)
(2/12) Installing py3-tomli (2.0.1-r1)
(3/12) Installing py3-pep517 (0.12.0-r2)
(4/12) Installing py3-six (1.16.0-r1)
(5/12) Installing py3-retrying (1.3.3-r3)
2% ██
(6/12) Installing py3-appdirs (1.4.4-r3)
2% ██
3% ██
(7/12) Installing py3-more-itertools (8.13.0-r0)
3% ██
4% ███
5% ███
(8/12) Installing py3-ordered-set (4.0.2-r3)
5% ████
(9/12) Installing py3-parsing (2.4.7-r3)
5% ████
ERROR: py3-parsing-2.4.7-r3: IO ERROR
(10/12) Installing py3-packaging (21.3-r0)
8% ██████
ERROR: py3-packaging-21.3-r0: BAD signature
(11/12) Installing py3-setuptools (59.4.0-r0)
10% ███████
ERROR: py3-setuptools-59.4.0-r0: BAD signature
(12/12) Installing py3-pip (22.1.1-r0)
23% █████████████████
ERROR: py3-pip-22.1.1-r0: BAD signature
100% █████████████████████████████████████4 errors; 2154 MiB in 814 packages
$
For such an obvious culprit, I would expect it to do something when it runs into broken packages like that. at the very least when I try running the command again.
I saw this with apk 2.12.9 on postmarketOS 22.06.