summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-06-03 08:37:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-06-03 08:37:05 +0000
commit027f227852d644093b2eb1273e49c714c43eb8ee (patch)
tree73f6818304be394fb96e6a4e373f82c34bbb2cb0
parent8732195fd514e29db9140fcc38faabbc7e5bd4be (diff)
downloadabuild-027f227852d644093b2eb1273e49c714c43eb8ee.tar.gz
abuild-027f227852d644093b2eb1273e49c714c43eb8ee.tar.bz2
abuild-027f227852d644093b2eb1273e49c714c43eb8ee.tar.xz
abuild-027f227852d644093b2eb1273e49c714c43eb8ee.zip
abuild: pull in makedepends by using virtual packages in abuildrepo
Basicly, let apk-tools deal with the dependencies rather than let abuild do it
-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() {