From 7f2c98c8af2f6060728e8c31a85da798a72d13f1 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 8 Dec 2014 11:43:52 +0100 Subject: Fix corruption of uninstaller operations after 'soft restart' After updates have been installed, the user can restart the maintenance tool GUI, and check for updates again. If no updates are found then, availableComponents() will remain empty, letting fetchUpdaterPackages() nuke also all 'updaterComponentsDeps'. This in turn breaks sortOperationsBasedOnComponentDependencies(), which needs the list of components to calculate the order. Work around this by forcing a write of the uninstaller data before the core is re-initialized. This let the soft updater behave like an independent updater run ... if no updates are installed, the uninstaller is not written. Task-number: QTIFW-600 Change-Id: I83659491b8e2c0c7a0478362a6c3a4dfaec542b3 Reviewed-by: Tim Jenssen --- src/sdk/tabcontroller.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/sdk') diff --git a/src/sdk/tabcontroller.cpp b/src/sdk/tabcontroller.cpp index d0e322251..8c9f2cc0d 100644 --- a/src/sdk/tabcontroller.cpp +++ b/src/sdk/tabcontroller.cpp @@ -171,6 +171,11 @@ void TabController::restartWizard() d->m_core->networkSettingsChanged(); } + // Make sure we are writing the .dat file with the list of uninstall operations already now. + // Otherwise we will write at the end of the next updater run, with a potentially + // empty component list (if no updates are found). + d->m_core->writeUninstaller(); + // restart and switch back to intro page QTimer::singleShot(0, this, SLOT(init())); } -- cgit v1.2.3