diff options
author | Katja Marttila <katja.marttila@qt.io> | 2022-09-01 15:56:26 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2022-09-16 09:38:24 +0300 |
commit | 8c938ede3d7c834a4f65a983a4214a894784cdff (patch) | |
tree | b69ca43a879bf70d232493c1af23cbc2108ec022 | |
parent | 8d96a8b0f114f7baedcabcbfe35539cb686dcd5c (diff) |
Fix uninstallation of needed virtual components
In some rare cases, both component to be uninstalled and component to be
installed has dependency to same virtual component. In such case the
virtual component should not be uninstalled.
Change-Id: I3b826693d4a72d6765a5ac1ee9a3957fdf7415da
Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
-rw-r--r-- | src/libs/installer/uninstallercalculator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libs/installer/uninstallercalculator.cpp b/src/libs/installer/uninstallercalculator.cpp index 3de9f5b60..d54b5c2ab 100644 --- a/src/libs/installer/uninstallercalculator.cpp +++ b/src/libs/installer/uninstallercalculator.cpp @@ -205,7 +205,8 @@ void UninstallerCalculator::appendVirtualComponentsToUninstall(const bool revers // Check if installed or about to be updated -packages are dependant on the package const QList<Component*> installDependants = m_core->installDependants(virtualComponent); for (Component *dependant : installDependants) { - if (dependant->isInstalled() && !m_componentsToUninstall.contains(dependant)) { + if ((dependant->isInstalled() && !m_componentsToUninstall.contains(dependant)) + || m_core->orderedComponentsToInstall().contains(dependant)) { required = true; break; } |