summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/abuild.in b/abuild.in
index 13e9824..932efb2 100644
--- a/abuild.in
+++ b/abuild.in
@@ -1557,6 +1557,9 @@ build_abuildrepo() {
if options_has "checkx11"; then
_check=check_x11
fi
+ if options_has "checkretry"; then
+ _check=check_retry
+ fi
if ! want_check; then
_check=true
fi
@@ -1853,6 +1856,16 @@ check_x11() {
env DISPLAY=:7 dbus-run-session "$abuild_path" $forceroot $color_opt $keep_build check
}
+# wrap check() with retries
+check_retry() {
+ count=${ABUILD_RETRY_COUNT:=5}
+ (cd "$startdir";
+ while test $((count=$(($count-1)))) -ge 0; do
+ msg "Trying check..."
+ check && exit 0;
+ done; exit 1)
+}
+
# build and package in fakeroot
rootpkg() {
cd "$startdir"