Skip to content

Commit 163bc94

Browse files
authored
Merge pull request #3139 from tautschnig/retry-minisat
Re-try Minisat download (up to two times) in case it fails
2 parents 79cf777 + cc4347d commit 163bc94

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@ TAR = tar
8989

9090
minisat2-download:
9191
@echo "Downloading Minisat 2.2.1"
92-
@$(DOWNLOADER) http://ftp.debian.org/debian/pool/main/m/minisat2/minisat2_2.2.1.orig.tar.gz
92+
@for i in $$(seq 1 3) ; do \
93+
$(DOWNLOADER) \
94+
http://ftp.debian.org/debian/pool/main/m/minisat2/minisat2_2.2.1.orig.tar.gz && \
95+
exit 0 ; \
96+
$(RM) minisat2_2.2.1.orig.tar.gz ; \
97+
if [ $$i -lt 3 ] ; then echo "Re-trying in 10 seconds" 1>&2 ; sleep 10 ; fi ; \
98+
done ; exit 1
9399
@$(TAR) xfz minisat2_2.2.1.orig.tar.gz
94100
@rm -Rf ../minisat-2.2.1
95101
@mv minisat2-2.2.1 ../minisat-2.2.1

src/solvers/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ include("${CBMC_SOURCE_DIR}/../cmake/DownloadProject.cmake")
6060
if("${sat_impl}" STREQUAL "minisat2")
6161
message(STATUS "Building solvers with minisat2")
6262

63+
# once we upgrade to CMake 3.7 or higher we can specify multiple URLs as a
64+
# fall-back in case the first URL fails (the Makefile-based build retries up
65+
# to 2 times)
6366
download_project(PROJ minisat2
6467
URL http://ftp.debian.org/debian/pool/main/m/minisat2/minisat2_2.2.1.orig.tar.gz
6568
PATCH_COMMAND patch -p1 -i ${CBMC_SOURCE_DIR}/../scripts/minisat-2.2.1-patch

0 commit comments

Comments
 (0)