Verified Commit 5a162fad authored by Max Rees's avatar Max Rees

abuild, buildlab, checkapk: use $APK for apk

parent 9efd4a78
......@@ -2166,7 +2166,7 @@ rootbld() {
fi
[ "$CBUILD" = "$CHOST" ] || die "rootbld: cross-building not supported currently"
apk info -eq abuild-rootbld || die "rootbld: abuild-rootbld package not installed"
$APK info -eq abuild-rootbld || die "rootbld: abuild-rootbld package not installed"
logcmd "chroot building building $repo/$pkgname-$pkgver-r$pkgrel"
......
......@@ -106,8 +106,8 @@ do_chroot_action() {
update_chroot() {
local path="$1"
apk --root $path --repositories "$path"/etc/apk/repositories update
apk --root $path --repositories "$path"/etc/apk/repositories upgrade -a
$APK --root $path --repositories "$path"/etc/apk/repositories update
$APK --root $path --repositories "$path"/etc/apk/repositories upgrade -a
}
prepare_chroot() {
......@@ -139,19 +139,19 @@ prepare_chroot() {
msg "Updating package lists..."
apk --arch $buildarch --root $path --repositories "$path"/etc/apk/repositories update
$APK --arch $buildarch --root $path --repositories "$path"/etc/apk/repositories update
msg "Installing alpine-base..."
apk --arch $buildarch --root $path --repositories "$path"/etc/apk/repositories add --initdb alpine-base
$APK --arch $buildarch --root $path --repositories "$path"/etc/apk/repositories add --initdb alpine-base
msg "Installing abuild..."
apk --arch $buildarch --root $path --repositories "$path"/etc/apk/repositories add --initdb abuild
$APK --arch $buildarch --root $path --repositories "$path"/etc/apk/repositories add --initdb abuild
msg "Installing build-base..."
apk --arch $buildarch --root $path --repositories "$path"/etc/apk/repositories add --initdb build-base
$APK --arch $buildarch --root $path --repositories "$path"/etc/apk/repositories add --initdb build-base
msg "Adding abuild user..."
......
......@@ -15,6 +15,7 @@ if ! [ -f "$datadir/functions.sh" ]; then
fi
. "$datadir/functions.sh"
: ${APK:="apk"}
usage() {
cat >&2 <<-__EOF__
......@@ -67,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 --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 --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