[cmake-commits] hoffman committed cmCPackPackageMakerGenerator.cxx 1.21 1.22

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Dec 17 15:27:32 EST 2007


Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv10299

Modified Files:
	cmCPackPackageMakerGenerator.cxx 
Log Message:
ENH: try to fix dashboard


Index: cmCPackPackageMakerGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackPackageMakerGenerator.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- cmCPackPackageMakerGenerator.cxx	5 Nov 2007 19:34:36 -0000	1.21
+++ cmCPackPackageMakerGenerator.cxx	17 Dec 2007 20:27:30 -0000	1.22
@@ -112,7 +112,23 @@
       << 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;



More information about the Cmake-commits mailing list