diff options
Diffstat (limited to 'installerbuilder/libinstaller/packagemanagercore.cpp')
-rw-r--r-- | installerbuilder/libinstaller/packagemanagercore.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/installerbuilder/libinstaller/packagemanagercore.cpp b/installerbuilder/libinstaller/packagemanagercore.cpp index 9eddd7906..f83d7f426 100644 --- a/installerbuilder/libinstaller/packagemanagercore.cpp +++ b/installerbuilder/libinstaller/packagemanagercore.cpp @@ -927,11 +927,16 @@ bool PackageManagerCore::calculateComponentsToUninstall() const if (runMode() == UpdaterMode) return true; + // hack to avoid removeing needed dependencies + QSet<Component*> componentsToInstall = d->m_orderedComponentsToInstall.toSet(); + QList<Component*> components; foreach (Component *component, availableComponents()) { - if (component->uninstallationRequested()) + if (component->uninstallationRequested() && !componentsToInstall.contains(component)) components.append(component); } + + d->m_componentsToUninstall.clear(); return d->appendComponentsToUninstall(components); } |