diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-02-17 14:03:49 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-02-17 14:03:49 +0000 |
commit | e76192fa59702e1dd819bd39b82326ae9cd0c203 (patch) | |
tree | c34dc35e734b4b3db9cc9ab0aad07716bb5c6e9f | |
parent | ea206bfe2ebcd934a0008c3eafe2134dd13314aa (diff) | |
download | abuild-e76192fa59702e1dd819bd39b82326ae9cd0c203.tar.gz abuild-e76192fa59702e1dd819bd39b82326ae9cd0c203.tar.bz2 abuild-e76192fa59702e1dd819bd39b82326ae9cd0c203.tar.xz abuild-e76192fa59702e1dd819bd39b82326ae9cd0c203.zip |
abuild: do not create the apk index as root
-rwxr-xr-x | abuild.in | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -20,7 +20,8 @@ abuild_path=$(readlink -f $0) BUILD_BASE="build-base" FAKEROOT=${FAKEROOT:-"fakeroot"} -: ${APK:=abuild-apk} +: ${SUDO_APK:=abuild-apk} +: ${APK:=apk} : ${ADDUSER:=abuild-adduser} : ${ADDGROUP:=abuild-addgroup} @@ -103,7 +104,7 @@ cleanup() { set_xterm_title "" if [ -z "$install_after" ] && [ -n "$uninstall_after" ]; then msg "Uninstalling dependencies..." - $APK del --quiet $apk_opt_wait $uninstall_after + $SUDO_APK del --quiet $apk_opt_wait $uninstall_after fi if [ -n "$CLEANUP_FILES" ]; then rm -f $CLEANUP_FILES @@ -1292,10 +1293,10 @@ builddeps() { if [ -n "$install_deps" ] && [ -z "$recursive" ] && [ -n "$deps" ]; then # make a --simluate run first to detect missing deps # apk-tools --virtual is no goot at reporting those. - $APK add --repository "$abuildrepo" \ + $SUDO_APK add --repository "$abuildrepo" \ $apk_opt_wait \ --simulate --quiet $deps || return 1 - $APK add --repository "$abuildrepo" \ + $SUDO_APK add --repository "$abuildrepo" \ $apk_opt_wait \ --virtual .makedepends-$pkgname $deps \ && return 0 @@ -1327,7 +1328,7 @@ builddeps() { cd "$dir" && $0 $forceroot $keep $quiet $install_deps \ $recursive $upgrade $color_opt abuildindex || return 1 done - $APK add -u --repository "$abuildrepo" \ + $SUDO_APK add -u --repository "$abuildrepo" \ $apk_opt_wait \ --virtual .makedepends-$pkgname $deps } @@ -1442,18 +1443,18 @@ post_add() { post_add $i || return 1 fi done - $APK add $apk_opt_wait -u "$pkgf" || die "Failed to install $1" + $SUDO_APK add $apk_opt_wait -u "$pkgf" || die "Failed to install $1" } installdeps() { local deps i - $APK add $apk_opt_wait --repository "$abuildrepo" \ + $SUDO_APK add $apk_opt_wait --repository "$abuildrepo" \ --virtual .makedepends-$pkgname \ $makedepends } uninstalldeps (){ - $APK del $apk_opt_wait .makedepends-$pkgname + $SUDO_APK del $apk_opt_wait .makedepends-$pkgname } all() { |