[cmake-commits] alex committed cmCPackDebGenerator.cxx 1.6 1.7
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Aug 6 13:31:39 EDT 2007
Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv22096/CPack
Modified Files:
cmCPackDebGenerator.cxx
Log Message:
ENH: another fix for the deb generator by Mathieu
Alex
Index: cmCPackDebGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackDebGenerator.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cmCPackDebGenerator.cxx 6 Aug 2007 13:03:10 -0000 1.6
+++ cmCPackDebGenerator.cxx 6 Aug 2007 17:31:37 -0000 1.7
@@ -73,7 +73,7 @@
out << "Section: devel\n";
out << "Priority: optional\n";
out << "Architecture: " << debian_pkg_arch << "\n";
- out << "Depends: " << debian_pkg_dep << " \n";
+ out << "Depends: " << debian_pkg_dep << "\n";
out << "Maintainer: " << maintainer << "\n";
out << "Description: " << desc << "\n";
out << " " << debian_pkg_name << " was packaged by CMake.\n";
@@ -126,7 +126,8 @@
topLevelWithTrailingSlash.c_str(), "");
out << output;
}
- out << std::endl;
+ // each line contains a eol.
+ // Do not end the md5sum file with yet another (invalid)
}
@@ -157,6 +158,20 @@
res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output,
&retVal, toplevel, this->GeneratorVerbose, 0);
+ if ( !res || retVal )
+ {
+ std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
+ tmpFile += "/Deb.log";
+ cmGeneratedFileStream ofs(tmpFile.c_str());
+ ofs << "# Run command: " << cmd.c_str() << std::endl
+ << "# Output:" << std::endl
+ << output.c_str() << std::endl;
+ cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running ar command: "
+ << cmd.c_str() << std::endl
+ << "Please check " << tmpFile.c_str() << " for errors" << std::endl);
+ return 0;
+ }
+
return 1;
}
More information about the Cmake-commits
mailing list