summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in24
1 files changed, 14 insertions, 10 deletions
diff --git a/abuild.in b/abuild.in
index 9800a6e..5c9e42f 100755
--- a/abuild.in
+++ b/abuild.in
@@ -407,7 +407,6 @@ update_abuildrepo_index() {
todelete="$todelete ${pkg%-[0-9]*.apk}"
done
if [ -f "$index" ]; then
- echo "apk index -q -d \"$index\" $todelete || exit 1" >&2
apk index -q -d "$index" $todelete || exit 1
fi
apk index -q "$@" || exit 1
@@ -640,11 +639,14 @@ builddeps() {
fi
done
- [ -z "$missing" ] && return 0
+ [ -z "$missing" ] && [ -z "$install_deps" ] && [ -z "$recursive" ] \
+ && return 0
- if [ -n "$install_deps" ] && $SUDO apk add $missing; then
- uninstall_after="$missing $uninstall_after"
- return 0
+ uninstall_after=".makedepends-$pkgname $uninstall_after"
+ if [ -n "$install_deps" ]; then
+ $SUDO apk add --repo "$abuildrepo" \
+ --virtual .makedepends-$pkgname $deps \
+ && return 0
fi
[ -z "$recursive" ] && return 1
@@ -654,10 +656,10 @@ builddeps() {
local dir=${i#*:}
local pkg=${i%:*}
msg "Entering $dir"
- cd "$dir" || return 1
- $0 -k -i $pkg || return 1
- uninstall_after="$pkg $uninstall_after"
+ cd "$dir" && $0 -k -r abuildrepo || return 1
done
+ $SUDO apk add --repo "$abuildrepo" \
+ --virtual .makedepends-$pkgname $deps
}
# replace the md5sums in the APKBUILD
@@ -791,11 +793,13 @@ newaport() {
}
installdeps() {
- sudo apk add $depends $makedepends
+ local deps i
+ sudo apk add --repo "$abuildrepo" --virtual .makedepends-$pkgname \
+ $makedepends
}
uninstalldeps (){
- sudo apk del $depends $makedepends
+ sudo apk del .makedepends-$pkgname
}
usage() {