[cmake-developers] [Patch] ExternalProject: fix retry logic if error occurs
Ruslan Baratov
ruslan_baratov at yahoo.com
Wed May 18 15:30:45 EDT 2016
Hi,
For now download retry attempt occurs in ExternalProject only if hash of
archive mismatch. If error happens then script stop with FATAL_ERROR
(example:
https://ci.appveyor.com/project/ingenue/hunter/build/1.0.448/job/22kdl633f9w503ut).
I've attached patch with applying retry logic in cases when status code
is not zero.
Quite the same happening in
https://github.com/Kitware/CMake/commit/30a94eecdb5c580d83a224848b78d186643e8105
fix. Since `if(NOT status_code EQUAL 0)` trigger FATAL_ERROR, retry
logic in `_ep_write_verifyfile_script` function is not reached. I've set
default retry number to 5 with pauses 0, 5, 5, 15, 60 seconds. I left
some space for future improvements if needed (90, 300, 1200=20min)
probably can be controlled by some variable that will be available for
users.
Ruslo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ExternalProject-fix-retry-logic.patch
Type: text/x-patch
Size: 14600 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160518/d3fb03c9/attachment.bin>
More information about the cmake-developers
mailing list