abuild: pull in makedepends by using virtual packages in abuildrepo
Basicly, let apk-tools deal with the dependencies rather than let abuild do it
This commit is contained in:
parent
8732195fd5
commit
027f227852
24
abuild.in
24
abuild.in
|
@ -407,7 +407,6 @@ update_abuildrepo_index() {
|
||||||
todelete="$todelete ${pkg%-[0-9]*.apk}"
|
todelete="$todelete ${pkg%-[0-9]*.apk}"
|
||||||
done
|
done
|
||||||
if [ -f "$index" ]; then
|
if [ -f "$index" ]; then
|
||||||
echo "apk index -q -d \"$index\" $todelete || exit 1" >&2
|
|
||||||
apk index -q -d "$index" $todelete || exit 1
|
apk index -q -d "$index" $todelete || exit 1
|
||||||
fi
|
fi
|
||||||
apk index -q "$@" || exit 1
|
apk index -q "$@" || exit 1
|
||||||
|
@ -640,11 +639,14 @@ builddeps() {
|
||||||
fi
|
fi
|
||||||
done
|
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=".makedepends-$pkgname $uninstall_after"
|
||||||
uninstall_after="$missing $uninstall_after"
|
if [ -n "$install_deps" ]; then
|
||||||
return 0
|
$SUDO apk add --repo "$abuildrepo" \
|
||||||
|
--virtual .makedepends-$pkgname $deps \
|
||||||
|
&& return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "$recursive" ] && return 1
|
[ -z "$recursive" ] && return 1
|
||||||
|
@ -654,10 +656,10 @@ builddeps() {
|
||||||
local dir=${i#*:}
|
local dir=${i#*:}
|
||||||
local pkg=${i%:*}
|
local pkg=${i%:*}
|
||||||
msg "Entering $dir"
|
msg "Entering $dir"
|
||||||
cd "$dir" || return 1
|
cd "$dir" && $0 -k -r abuildrepo || return 1
|
||||||
$0 -k -i $pkg || return 1
|
|
||||||
uninstall_after="$pkg $uninstall_after"
|
|
||||||
done
|
done
|
||||||
|
$SUDO apk add --repo "$abuildrepo" \
|
||||||
|
--virtual .makedepends-$pkgname $deps
|
||||||
}
|
}
|
||||||
|
|
||||||
# replace the md5sums in the APKBUILD
|
# replace the md5sums in the APKBUILD
|
||||||
|
@ -791,11 +793,13 @@ newaport() {
|
||||||
}
|
}
|
||||||
|
|
||||||
installdeps() {
|
installdeps() {
|
||||||
sudo apk add $depends $makedepends
|
local deps i
|
||||||
|
sudo apk add --repo "$abuildrepo" --virtual .makedepends-$pkgname \
|
||||||
|
$makedepends
|
||||||
}
|
}
|
||||||
|
|
||||||
uninstalldeps (){
|
uninstalldeps (){
|
||||||
sudo apk del $depends $makedepends
|
sudo apk del .makedepends-$pkgname
|
||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
|
|
Loading…
Reference in New Issue