abuild: wait for lockfile on delete of dependencies

This commit is contained in:
Natanael Copa 2011-03-30 09:10:11 +00:00
parent 3af17782ad
commit 138cfd7027

View File

@ -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() {