diff options
author | Brad King <brad.king@kitware.com> | 2012-03-13 15:54:03 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-03-13 15:54:03 (GMT) |
commit | 88720153a9126d950f92ef1c8ce5802997eb9c51 (patch) | |
tree | 2b3b3697340a7063fe0754b95ab5acd81c036006 | |
parent | b96424012d47f0b30b067443702502a7cb9fc433 (diff) | |
parent | 05a76d53c0ff99f698760080c2fbde7f1e47cf7a (diff) | |
download | CMake-88720153a9126d950f92ef1c8ce5802997eb9c51.zip CMake-88720153a9126d950f92ef1c8ce5802997eb9c51.tar.gz CMake-88720153a9126d950f92ef1c8ce5802997eb9c51.tar.bz2 |
Merge topic 'fix-cpack-hdiutil-retry-loops'
05a76d5 CPack: Fix retry logic when calls to hdiutil fail
-rw-r--r-- | Source/CPack/cmCPackOSXX11Generator.cxx | 8 | ||||
-rw-r--r-- | Source/CPack/cmCPackPackageMakerGenerator.cxx | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx index 75ad640..363ccea 100644 --- a/Source/CPack/cmCPackOSXX11Generator.cxx +++ b/Source/CPack/cmCPackOSXX11Generator.cxx @@ -170,23 +170,25 @@ int cmCPackOSXX11Generator::PackageFiles() << "\" create -ov -format UDZO -srcfolder \"" << diskImageDirectory.c_str() << "\" \"" << packageFileNames[0] << "\""; - int retVal = 1; cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Compress disk image using command: " << dmgCmd.str().c_str() << std::endl); // since we get random dashboard failures with this one // try running it more than once - int numTries = 4; + int retVal = 1; + int numTries = 10; bool res = false; while(numTries > 0) { res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output, &retVal, 0, this->GeneratorVerbose, 0); - if(res && retVal) + if ( res && !retVal ) { numTries = -1; + break; } + cmSystemTools::Delay(500); numTries--; } if ( !res || retVal ) diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx index 0c4b1a6..327c4a6 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.cxx +++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx @@ -319,17 +319,19 @@ int cmCPackPackageMakerGenerator::PackageFiles() << "\" \"" << packageFileNames[0] << "\""; std::string output; int retVal = 1; - int numTries = 4; + int numTries = 10; bool res = false; while(numTries > 0) { res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output, &retVal, 0, this->GeneratorVerbose, 0); - if(res && retVal) + if ( res && !retVal ) { numTries = -1; + break; } + cmSystemTools::Delay(500); numTries--; } if ( !res || retVal ) |