Verified Commit e91c1ca5 authored by Max Rees's avatar Max Rees
Browse files

checkapk: use APK_FETCH for apk

parent f4e30e19
......@@ -15,7 +15,7 @@ if ! [ -f "$datadir/functions.sh" ]; then
fi
. "$datadir/functions.sh"
: ${APK:="apk"}
: ${APK_FETCH:="apk"}
usage() {
cat >&2 <<-__EOF__
......@@ -68,12 +68,12 @@ for i in $pkgname $subpackages; do
# generate a temp repositories file with only the http(s) repos
grep -E "^https?:" /etc/apk/repositories > $tmpdir/repositories
oldpkg=$($APK fetch --repositories-file $tmpdir/repositories --simulate 2>&1 | sed 's/^Downloading //')
oldpkg=$($APK_FETCH fetch --repositories-file $tmpdir/repositories --simulate 2>&1 | sed 's/^Downloading //')
if [ "${oldpkg}" = "${pkg}" ]; then
die "the built package ($_pkgname) is already in the repo"
fi
$APK fetch --quiet --repositories-file $tmpdir/repositories --stdout $_pkgname \
$APK_FETCH fetch --quiet --repositories-file $tmpdir/repositories --stdout $_pkgname \
| tar -ztf - | grep -v '^\.SIGN\.' | sort > filelist-$_pkgname-old \
|| die "failed to download old pkg, maybe run 'apk update'?"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment