summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-03-13 15:54:03 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-03-13 15:54:03 (GMT)
commit88720153a9126d950f92ef1c8ce5802997eb9c51 (patch)
tree2b3b3697340a7063fe0754b95ab5acd81c036006
parentb96424012d47f0b30b067443702502a7cb9fc433 (diff)
parent05a76d53c0ff99f698760080c2fbde7f1e47cf7a (diff)
downloadCMake-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.cxx8
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx6
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 )