ENH: try to fix dashboard

This commit is contained in:
Bill Hoffman 2007-12-17 15:27:30 -05:00
parent 5e0dadbfb8
commit 4c108d2a24
1 changed files with 17 additions and 1 deletions

View File

@ -112,7 +112,23 @@ int cmCPackPackageMakerGenerator::CompressFiles(const char* outFileName,
<< std::endl);
return 0;
}
// sometimes the pkgCmd finishes but the directory is not yet
// created, so try 10 times to see if it shows up
int tries = 10;
while(tries > 0 &&
!cmSystemTools::FileExists(packageDirFileName.c_str()))
{
cmSystemTools::Delay(500);
tries--;
}
if(!cmSystemTools::FileExists(packageDirFileName.c_str()))
{
cmCPackLogger(
cmCPackLog::LOG_ERROR,
"Problem running PackageMaker command: " << pkgCmd.str().c_str()
<< std::endl << "Package not created: " << packageDirFileName.c_str()
<< std::endl);
}
tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/hdiutilOutput.log";
cmOStringStream dmgCmd;