mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-20 22:41:01 +00:00
checkapk: calculate size difference of packages
This commit is contained in:
parent
13993e014a
commit
b3c1b65f75
12
checkapk.in
12
checkapk.in
@ -72,6 +72,18 @@ for i in $pkgname $subpackages; do
|
||||
die "the built package ($_pkgname) is already in the repo"
|
||||
fi
|
||||
|
||||
# For our local repo (newsize) apk info might return multiple packages, e.g. if different
|
||||
# version of the package where build previously. Filter out this specific pkgver using awk.
|
||||
newsize=$(apk info --repositories-file /dev/null --repository "$REPODEST"/$repo --size $_pkgname | \
|
||||
awk "/^$pkg/ { found = 1 } /^[0-9]+/ { if (found) { print \$0; exit } }")
|
||||
oldsize=$(apk info --repositories-file $tmpdir/repositories --size $_pkgname | awk '/^[0-9]+/ { print $0 }' | head -1)
|
||||
|
||||
if [ "$oldsize" = "$newsize" ]; then
|
||||
msg "No size differences for $_pkgname."
|
||||
else
|
||||
msg "Size difference for $_pkgname: $oldsize -> $newsize"
|
||||
fi
|
||||
|
||||
apk fetch --quiet --repositories-file $tmpdir/repositories --stdout $_pkgname \
|
||||
| tar -zt | grep -v '^\.SIGN\.' | sort > filelist-$_pkgname-old \
|
||||
|| die "failed to download old pkg, maybe run 'apk update'?"
|
||||
|
Loading…
Reference in New Issue
Block a user