Hi all,
I was trying to determine the full size of the compressed x86 packages at packages.wolfi.dev and ran into a package that has an corrupt size field causing my calculation to return 17 Billion GB total, lol.
curl -s https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz | tar -xzf - APKINDEX
grep -B5 "^S:18446744073709551615" APKINDEX
C:Q1VBI5MTSSDXhDoGXhRNCy1lguvtM=
P:nginx-stable-mod-mail
V:1.26.2-r2
A:x86_64
S:18446744073709551615
The value is 18446744073709551615 (2^64 - 1 / UINT64_MAX), which appears to be -1 interpreted as an unsigned 64-bit integer.
For reference, filtering out this entry gives a more realistic size.
grep "^S:" APKINDEX | cut -d: -f2 | awk '$1 < 100000000000 {sum+=$1} END {printf "%.2f GB\n", sum/1024/1024/1024}'
# 1950.80 GB
Wanted to open this in case this could be causing issues for anyone.
Thank you