pkg-binaries: the manifest is written once, before the download
The second loop wrote $tmp/files again, so .fetch-files had two lines per package (measured 2026-11-23 on the MacBook: 564 lines for 282 packages). Its size lookup then read the wrong record and threw away the archives it had just fetched.
This commit is contained in:
1 parent
7388548136
commit
3c3eb59813
1 file changed
+3
-1
@@ -215,7 +215,9 @@ stale=
|
||||
while read -r p; do
|
||||
file=$(awk -F'\t' -v p="$p" '$1 == p { print $3 }' "$tmp/index")
|
||||
size=$(awk -F'\t' -v p="$p" '$1 == p { print $2 }' "$tmp/index")
|
||||
echo "$file $size" >> "$tmp/files"
|
||||
# The manifest was written above, before the first download; writing it
|
||||
# again here doubled every line (measured 2026-11-23: 564 lines for 282
|
||||
# packages on the MacBook).
|
||||
dst=$OUT/All/$file
|
||||
have=$({ wc -c < "$dst"; } 2>/dev/null | tr -d ' ')
|
||||
if [ "${have:-0}" != "$size" ]; then
|
||||
|
||||
Reference in new issue
Block a user