summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2019-05-04 04:21:47 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2019-05-04 05:51:03 -0400
commit1b22ba2b7fc81aa83093057286a498957e8da610 (patch)
tree19879c796e75771e88c4157c3ea86e026e7cc82e
parent9aa9c901270cd06e8db142c621f91b1824cd91cb (diff)
truncate error messagesv3.2.4-parabola3
-rw-r--r--src/libcalamares/PacstrapCppJob.cpp7
-rw-r--r--src/libcalamares/PacstrapCppJob.h1
-rw-r--r--src/libcalamaresui/ViewManager.cpp18
3 files changed, 16 insertions, 10 deletions
diff --git a/src/libcalamares/PacstrapCppJob.cpp b/src/libcalamares/PacstrapCppJob.cpp
index 6a8a0c2a8..e6762b50e 100644
--- a/src/libcalamares/PacstrapCppJob.cpp
+++ b/src/libcalamares/PacstrapCppJob.cpp
@@ -110,7 +110,8 @@ const QString PacstrapCppJob::KEYRING_ERROR_MSG = "Failed to update the p
const QString PacstrapCppJob::MOUNT_ERROR_MSG = "Failed to mount the pacstrap chroot." ;
const QString PacstrapCppJob::CHROOT_PREP_ERROR_MSG = "Failed to prepare the pacstrap chroot." ;
const QString PacstrapCppJob::PACMAN_SYNC_ERROR_MSG = "Failed to syncronize packages in the pacstrap chroot." ;
-const QString PacstrapCppJob::PACSTRAP_ERROR_MSG = "Failed to install packages in chroot. " ;
+const QString PacstrapCppJob::LIST_PACKAGES_ERROR_MSG = "Failed to compile packages list." ;
+const QString PacstrapCppJob::PACSTRAP_ERROR_MSG = "Failed to install packages in chroot." ;
// const QString PacstrapCppJob::UMOUNT_ERROR_MSG = "Failed to unmount the pacstrap chroot." ;
const QString PacstrapCppJob::STATUS_KEY = QString("status") ;
const QString PacstrapCppJob::STDOUT_KEY = QString("stdout") ;
@@ -198,7 +199,7 @@ DEBUG_TRACE_EXEC
this->nPreviousPackages = nPackagesInstalled() ;
this->nPendingPackages = new_packages.count(QChar::LineFeed) ;
- if (!!status) return JobError(stderr) ;
+ if (!!status) return JobError(LIST_PACKAGES_ERROR_MSG) ;
if (this->nPendingPackages > 0)
{
@@ -226,7 +227,7 @@ DEBUG_TRACE_EXEC
}
execStatus(pacstrap_rm_cmd) ;
- if (!!pacstrap_status) return JobError(PACSTRAP_ERROR_MSG + pacstrap_error) ;
+ if (!!pacstrap_status) return JobError(PACSTRAP_ERROR_MSG) ;
QString exec_error_msg = chrootExecPostInstall() ;
diff --git a/src/libcalamares/PacstrapCppJob.h b/src/libcalamares/PacstrapCppJob.h
index faee85056..ee81d60b8 100644
--- a/src/libcalamares/PacstrapCppJob.h
+++ b/src/libcalamares/PacstrapCppJob.h
@@ -148,6 +148,7 @@ private:
static const QString MOUNT_ERROR_MSG ;
static const QString CHROOT_PREP_ERROR_MSG ;
static const QString PACMAN_SYNC_ERROR_MSG ;
+ static const QString LIST_PACKAGES_ERROR_MSG ;
static const QString PACSTRAP_ERROR_MSG ;
static const QString UMOUNT_ERROR_MSG ;
static const QString STATUS_KEY ;
diff --git a/src/libcalamaresui/ViewManager.cpp b/src/libcalamaresui/ViewManager.cpp
index c3d772b8f..10f77961b 100644
--- a/src/libcalamaresui/ViewManager.cpp
+++ b/src/libcalamaresui/ViewManager.cpp
@@ -173,26 +173,30 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
msgBox->setInformativeText( text );
// parabola ISO bug report notice
- if (QFile::exists("/home/parabola/Desktop/parabola-installer.desktop"))
+ if ( QFile::exists( "/home/parabola/Desktop/parabola-installer.desktop" ) )
{
- QFile::copy(Logger::logFile(), "/home/parabola/Desktop/install.log");
+ QFile::copy( Logger::logFile(), "/home/parabola/Desktop/install.log" );
+#define MAX_ERROR_MSG_LEN 1024
+ QString truncated_message = message.left( MAX_ERROR_MSG_LEN );
+ QString truncated_details = details.left( MAX_ERROR_MSG_LEN - message.length() );
text = "A file named 'install.log' has been placed on the desktop which could be ";
#ifndef NYI // TODO:
text += "useful in diagnosing the cause of this failure. ";
- text += "You can open a bug report by logging into the Parabola Bug Tracker ";
+ text += "You can open a bug report by signing into the Parabola Bug Tracker ";
text += "(the 'Report a Bug' desktop shortcut). If you do file a bug report, ";
#else // NYI
text += "useful in diagnosing the cause of this failure. The \"Report Bug\" ";
text += "button below will send the 'install.log' to Parabola anonymously. ";
- text += "If you would like to receive email regarding this issue, then you can ";
+ text += "If you would like to receive an email reply regarding this issue, then ";
+ text += "you can open a bug report by signing into the Parabola Bug Tracker ";
text += "(the 'Report a Bug' desktop shortcut). If you do file a bug report manually, ";
#endif // NYI
text += "please include the 'Reason' given below in the bug report description; ";
text += "and use the \"Choose Files\" button to attach the 'install.log' file.";
- text += "<p>Reason:<br />" + message + "</p>";
- if ( !details.isEmpty() )
- text += "<p>Details:<br />" + details + "</p>";
+ text += "<p>Reason:<br />" + truncated_message + "</p>";
+ if ( !truncated_details.isEmpty() )
+ text += "<p>Details:<br />" + truncated_details + "</p>";
msgBox->setInformativeText( text );
}