Commit 027f2278 authored by Natanael Copa's avatar Natanael Copa

abuild: pull in makedepends by using virtual packages in abuildrepo

Basicly, let apk-tools deal with the dependencies rather than let abuild do it
parent 8732195f
......@@ -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() {
......
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