summaryrefslogtreecommitdiffstats
path: root/installerbuilder
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@nokia.com>2011-08-22 11:14:17 +0200
committerTim Jenssen <tim.jenssen@nokia.com>2011-08-22 11:50:09 +0200
commita3e05e5aef8e2ffa321937be359b5118058c2da1 (patch)
tree7dd2b765eb8477da7abab5b349c6144c5e3f85f3 /installerbuilder
parentc258796ccc2bf27f6bd71cfacacc14f4438debf0 (diff)
Fix the updater case for replacements.
Change-Id: Ie8f31dcc366bbcffd165b50e6e1b8abbf8de9118 Reviewed-on: http://codereview.qt.nokia.com/3300 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Niels Weber <niels.2.weber@nokia.com> Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'installerbuilder')
-rw-r--r--installerbuilder/libinstaller/packagemanagercore_p.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/installerbuilder/libinstaller/packagemanagercore_p.cpp b/installerbuilder/libinstaller/packagemanagercore_p.cpp
index 51ef9f5be..e038f64f0 100644
--- a/installerbuilder/libinstaller/packagemanagercore_p.cpp
+++ b/installerbuilder/libinstaller/packagemanagercore_p.cpp
@@ -1269,13 +1269,16 @@ void PackageManagerCorePrivate::runPackageUpdater()
}
}
- // In package manager mode a component (one to replace) might be scheduled for uninstall, but we
- // don't know if it should be uninstalled. To figure this out we need to check the actual
- // replacement if it is still checked. If so, skip the undo operation. This avoids an update if we
- // actually do a completely different component install/ uninstall.
- if (isPackageManager() && m_componentsToReplaceAllMode.contains(name)) {
- if (m_componentsToReplaceAllMode.value(name).first->isSelected())
+ // A component (one to replace) might be scheduled for uninstall, but we really don't know if it
+ // should be uninstalled. To figure this out we need to check the actual replacement if it is
+ // checked. If so, skip the undo operation. This avoids an update if we actually do a completely
+ // different component install/ uninstall.
+ if (componentsToReplace(m_core->runMode()).contains(name)) {
+ if ((isUpdater() && !m_componentsToReplaceUpdaterMode.value(name).first->updateRequested())
+ || isPackageManager() && m_componentsToReplaceAllMode.value(name).first->isSelected()) {
+ nonRevertedOperations.append(operation);
continue;
+ }
}
// Filter out the create target dir undo operation, it's only needed for full uninstall.