summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@digia.com>2013-10-04 16:38:19 +0200
committerTim Jenssen <tim.jenssen@digia.com>2013-10-07 15:47:39 +0200
commit1d090c2899925d03435dc8a160b431b2e57739b9 (patch)
tree9af126c27f667feafe00a1129cc9ef42ff0c9ab9 /src/libs
parent5ac4ca834fb1f183585c5dbbb13690ebb9a53753 (diff)
make replacing installer base binary more verbose
Change-Id: Ib11b3cfa4121241421d479af23ed0ee111c0069c Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com> Reviewed-by: Michal Klocek <michal.klocek@digia.com>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/installer/packagemanagercore_p.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp
index a840d6d1e..743e41490 100644
--- a/src/libs/installer/packagemanagercore_p.cpp
+++ b/src/libs/installer/packagemanagercore_p.cpp
@@ -1265,13 +1265,18 @@ void PackageManagerCorePrivate::writeUninstaller(OperationList performedOperatio
bool newBinaryWritten = false;
bool replacementExists = false;
const QString installerBaseBinary = m_core->replaceVariables(m_installerBaseBinaryUnreplaced);
- if (!installerBaseBinary.isEmpty() && QFileInfo(installerBaseBinary).exists()) {
+ if (!installerBaseBinary.isEmpty() && !QFileInfo(installerBaseBinary).exists()) {
+ qWarning() << "The current installer base binary could not updated with a not existing '%1'. "
+ "Please fix the 'installer.setInstallerBaseBinary(<temp_installer_base_binary_path>)' call "
+ "in your scripts.";
+ } else if (!installerBaseBinary.isEmpty()) {
qDebug() << "Got a replacement installer base binary:" << installerBaseBinary;
QFile replacementBinary(installerBaseBinary);
try {
openForRead(&replacementBinary, replacementBinary.fileName());
writeUninstallerBinary(&replacementBinary, replacementBinary.size(), true);
+ qDebug() << "Wrote the binary with the new replacement.";
m_forceRestart = true;
newBinaryWritten = true;
@@ -1280,7 +1285,10 @@ void PackageManagerCorePrivate::writeUninstaller(OperationList performedOperatio
qDebug() << error.message();
}
- if (!replacementBinary.remove()) {
+ if (replacementBinary.remove()) {
+ qDebug() << QString::fromLatin1("Removed temporary installer base replacement binary file: %1").arg(
+ installerBaseBinary);
+ } else {
// Is there anything more sensible we can do with this error? I think not. It's not serious
// enough for throwing / aborting the process.
qDebug() << QString::fromLatin1("Could not remove installer base binary (%1) after updating "