mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 20:00:51 -05:00
Refactor: Drop redundand std::endl calls in the middle of output
This commit is contained in:
@@ -249,11 +249,15 @@ bool DebGenerator::generateDataTar() const
|
|||||||
// do not recurse because the loop will do it
|
// do not recurse because the loop will do it
|
||||||
if (!data_tar.Add(file, topLevelLength, ".", false)) {
|
if (!data_tar.Add(file, topLevelLength, ".", false)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"Problem adding file to tar:"
|
"Problem adding file to tar:\n"
|
||||||
<< std::endl
|
"#top level directory: "
|
||||||
<< "#top level directory: " << this->WorkDir << std::endl
|
<< this->WorkDir
|
||||||
<< "#file: " << file << std::endl
|
<< "\n"
|
||||||
<< "#error:" << data_tar.GetError() << std::endl);
|
"#file: "
|
||||||
|
<< file
|
||||||
|
<< "\n"
|
||||||
|
"#error:"
|
||||||
|
<< data_tar.GetError() << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -335,11 +339,13 @@ bool DebGenerator::generateControlTar(std::string const& md5Filename) const
|
|||||||
!control_tar.Add(this->WorkDir + "/control", this->WorkDir.length(),
|
!control_tar.Add(this->WorkDir + "/control", this->WorkDir.length(),
|
||||||
".")) {
|
".")) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"Error adding file to tar:"
|
"Error adding file to tar:\n"
|
||||||
<< std::endl
|
"#top level directory: "
|
||||||
<< "#top level directory: " << this->WorkDir << std::endl
|
<< this->WorkDir
|
||||||
<< "#file: \"control\" or \"md5sums\"" << std::endl
|
<< "\n"
|
||||||
<< "#error:" << control_tar.GetError() << std::endl);
|
"#file: \"control\" or \"md5sums\"\n"
|
||||||
|
"#error:"
|
||||||
|
<< control_tar.GetError() << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,11 +353,13 @@ bool DebGenerator::generateControlTar(std::string const& md5Filename) const
|
|||||||
if (this->GenShLibs) {
|
if (this->GenShLibs) {
|
||||||
if (!control_tar.Add(this->ShLibsFilename, this->WorkDir.length(), ".")) {
|
if (!control_tar.Add(this->ShLibsFilename, this->WorkDir.length(), ".")) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"Error adding file to tar:"
|
"Error adding file to tar:\n"
|
||||||
<< std::endl
|
"#top level directory: "
|
||||||
<< "#top level directory: " << this->WorkDir << std::endl
|
<< this->WorkDir
|
||||||
<< "#file: \"shlibs\"" << std::endl
|
<< "\n"
|
||||||
<< "#error:" << control_tar.GetError() << std::endl);
|
"#file: \"shlibs\"\n"
|
||||||
|
"#error:"
|
||||||
|
<< control_tar.GetError() << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -361,11 +369,13 @@ bool DebGenerator::generateControlTar(std::string const& md5Filename) const
|
|||||||
control_tar.SetPermissions(permission755);
|
control_tar.SetPermissions(permission755);
|
||||||
if (!control_tar.Add(this->PostInst, this->WorkDir.length(), ".")) {
|
if (!control_tar.Add(this->PostInst, this->WorkDir.length(), ".")) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"Error adding file to tar:"
|
"Error adding file to tar:\n"
|
||||||
<< std::endl
|
"#top level directory: "
|
||||||
<< "#top level directory: " << this->WorkDir << std::endl
|
<< this->WorkDir
|
||||||
<< "#file: \"postinst\"" << std::endl
|
<< "\n"
|
||||||
<< "#error:" << control_tar.GetError() << std::endl);
|
"#file: \"postinst\"\n"
|
||||||
|
"#error:"
|
||||||
|
<< control_tar.GetError() << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
control_tar.SetPermissions(permission644);
|
control_tar.SetPermissions(permission644);
|
||||||
@@ -375,11 +385,13 @@ bool DebGenerator::generateControlTar(std::string const& md5Filename) const
|
|||||||
control_tar.SetPermissions(permission755);
|
control_tar.SetPermissions(permission755);
|
||||||
if (!control_tar.Add(this->PostRm, this->WorkDir.length(), ".")) {
|
if (!control_tar.Add(this->PostRm, this->WorkDir.length(), ".")) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"Error adding file to tar:"
|
"Error adding file to tar:\n"
|
||||||
<< std::endl
|
"#top level directory: "
|
||||||
<< "#top level directory: " << this->WorkDir << std::endl
|
<< this->WorkDir
|
||||||
<< "#file: \"postinst\"" << std::endl
|
<< "\n"
|
||||||
<< "#error:" << control_tar.GetError() << std::endl);
|
"#file: \"postinst\"\n"
|
||||||
|
"#error:"
|
||||||
|
<< control_tar.GetError() << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
control_tar.SetPermissions(permission644);
|
control_tar.SetPermissions(permission644);
|
||||||
@@ -413,11 +425,12 @@ bool DebGenerator::generateControlTar(std::string const& md5Filename) const
|
|||||||
// if we can copy the file, it means it does exist, let's add it:
|
// if we can copy the file, it means it does exist, let's add it:
|
||||||
if (!cmsys::SystemTools::FileExists(i)) {
|
if (!cmsys::SystemTools::FileExists(i)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_WARNING,
|
cmCPackLogger(cmCPackLog::LOG_WARNING,
|
||||||
"Adding file to tar:" << std::endl
|
"Adding file to tar:\n"
|
||||||
<< "#top level directory: "
|
"#top level directory: "
|
||||||
<< this->WorkDir << std::endl
|
<< this->WorkDir
|
||||||
<< "#missing file: " << i
|
<< "\n"
|
||||||
<< std::endl);
|
"#missing file: "
|
||||||
|
<< i << std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmsys::SystemTools::CopyFileIfDifferent(i, localcopy)) {
|
if (cmsys::SystemTools::CopyFileIfDifferent(i, localcopy)) {
|
||||||
@@ -452,12 +465,15 @@ bool DebGenerator::generateDeb() const
|
|||||||
!deb.Add(tlDir + "control.tar.gz", tlDir.length()) ||
|
!deb.Add(tlDir + "control.tar.gz", tlDir.length()) ||
|
||||||
!deb.Add(tlDir + "data.tar" + this->CompressionSuffix, tlDir.length())) {
|
!deb.Add(tlDir + "data.tar" + this->CompressionSuffix, tlDir.length())) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"Error creating debian package:"
|
"Error creating debian package:\n"
|
||||||
<< std::endl
|
"#top level directory: "
|
||||||
<< "#top level directory: " << this->TopLevelDir
|
<< this->TopLevelDir
|
||||||
<< std::endl
|
<< "\n"
|
||||||
<< "#file: " << this->OutputName << std::endl
|
"#file: "
|
||||||
<< "#error:" << deb.GetError() << std::endl);
|
<< this->OutputName
|
||||||
|
<< "\n"
|
||||||
|
"#error:"
|
||||||
|
<< deb.GetError() << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user