Skip to content

Re-try Minisat download (up to two times) in case it fails #3139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ TAR = tar

minisat2-download:
@echo "Downloading Minisat 2.2.1"
@$(DOWNLOADER) http://ftp.debian.org/debian/pool/main/m/minisat2/minisat2_2.2.1.orig.tar.gz
@for i in $$(seq 1 3) ; do \
$(DOWNLOADER) \
http://ftp.debian.org/debian/pool/main/m/minisat2/minisat2_2.2.1.orig.tar.gz && \
exit 0 ; \
$(RM) minisat2_2.2.1.orig.tar.gz ; \
if [ $$i -lt 3 ] ; then echo "Re-trying in 10 seconds" 1>&2 ; sleep 10 ; fi ; \
done ; exit 1
@$(TAR) xfz minisat2_2.2.1.orig.tar.gz
@rm -Rf ../minisat-2.2.1
@mv minisat2-2.2.1 ../minisat-2.2.1
Expand Down
3 changes: 3 additions & 0 deletions src/solvers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ include("${CBMC_SOURCE_DIR}/../cmake/DownloadProject.cmake")
if("${sat_impl}" STREQUAL "minisat2")
message(STATUS "Building solvers with minisat2")

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