summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-03-30 09:10:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-03-30 09:10:11 +0000
commit138cfd7027c3e947dacc91994da64351bd1fe128 (patch)
treea7cf45349ce96662f18dcb0f64e934645922f8d5
parent3af17782ad88ef78bd071ec7a24d94d6cd474696 (diff)
downloadabuild-138cfd7027c3e947dacc91994da64351bd1fe128.tar.gz
abuild-138cfd7027c3e947dacc91994da64351bd1fe128.tar.bz2
abuild-138cfd7027c3e947dacc91994da64351bd1fe128.tar.xz
abuild-138cfd7027c3e947dacc91994da64351bd1fe128.zip
abuild: wait for lockfile on delete of dependencies
-rwxr-xr-xabuild.in15
1 files changed, 8 insertions, 7 deletions
diff --git a/abuild.in b/abuild.in
index 78bdedf..7240048 100755
--- a/abuild.in
+++ b/abuild.in
@@ -21,6 +21,7 @@ BUILD_BASE="build-base"
SUDO=${SUDO:-"sudo"}
FAKEROOT=${FAKEROOT:-"fakeroot"}
APK=${APK:-apk}
+apk_opt_wait="--wait 30"
# read config
ABUILD_CONF=${ABUILD_CONF:-"$sysconfdir/abuild.conf"}
@@ -82,7 +83,7 @@ set_xterm_title() {
cleanup() {
set_xterm_title ""
if [ -z "$install_after" ] && [ -n "$uninstall_after" ]; then
- $SUDO $APK del $uninstall_after
+ $SUDO $APK del $apk_opt_wait $uninstall_after
fi
}
@@ -1104,10 +1105,10 @@ builddeps() {
# make a --simluate run first to detect missing deps
# apk-tools --virtual is no goot at reporting those.
$SUDO $APK add --repository "$abuildrepo" \
- --wait 30 \
+ $apk_opt_wait \
--simulate --quiet $deps || return 1
$SUDO $APK add --repository "$abuildrepo" \
- --wait 30 \
+ $apk_opt_wait \
--virtual .makedepends-$pkgname $deps \
&& return 0
fi
@@ -1139,7 +1140,7 @@ builddeps() {
$recursive $upgrade $color_opt abuildindex || return 1
done
$SUDO $APK add -u --repository "$abuildrepo" \
- --wait 30 \
+ $apk_opt_wait \
--virtual .makedepends-$pkgname $deps
}
@@ -1253,18 +1254,18 @@ post_add() {
post_add $i || return 1
fi
done
- $SUDO $APK add --wait 30 -u "$pkgf" || die "Failed to install $1"
+ $SUDO $APK add $apk_opt_wait -u "$pkgf" || die "Failed to install $1"
}
installdeps() {
local deps i
- $SUDO $APK add --wait 30 --repository "$abuildrepo" \
+ $SUDO $APK add $apk_opt_wait --repository "$abuildrepo" \
--virtual .makedepends-$pkgname \
$makedepends
}
uninstalldeps (){
- $SUDO $APK del .makedepends-$pkgname
+ $SUDO $APK del $apk_opt_wait .makedepends-$pkgname
}
all() {