summaryrefslogtreecommitdiff
path: root/Source/CPack/cmCPackDebGenerator.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-08-06 13:31:37 -0400
committerAlexander Neundorf <neundorf@kde.org>2007-08-06 13:31:37 -0400
commitf23169b01a056847b7caaa4fe5dfd8198af2f55d (patch)
tree29729dcd79949632a9117f40fb117878ee8c9941 /Source/CPack/cmCPackDebGenerator.cxx
parente41e2e6b1a3a801afe45d96663ccd53179776fa8 (diff)
downloadcmake-f23169b01a056847b7caaa4fe5dfd8198af2f55d.tar.gz
ENH: another fix for the deb generator by Mathieu
Alex
Diffstat (limited to 'Source/CPack/cmCPackDebGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 9a236fbe72..9d0d512871 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -73,7 +73,7 @@ int cmCPackDebGenerator::CompressFiles(const char* outFileName,
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 @@ int cmCPackDebGenerator::CompressFiles(const char* outFileName,
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 @@ int cmCPackDebGenerator::CompressFiles(const char* outFileName,
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;
}