summaryrefslogtreecommitdiffstats
path: root/installerbuilder/libinstaller
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@nokia.com>2011-11-22 17:17:25 +0100
committerTim Jenssen <tim.jenssen@nokia.com>2011-11-23 13:03:31 +0100
commit1fb2807c4a011228920ce0ca5fbc521bebdbeb52 (patch)
tree426431f69accc9ebcc3b7e179acb8ecc815d42f3 /installerbuilder/libinstaller
parent707956ed5d2b9c127e4a5f5705addcda8d8cfd4a (diff)
remove autodependon need to check the replacements aswell
Change-Id: I4e5002c773c45bd660c5d4f40c74a985316113bb Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'installerbuilder/libinstaller')
-rw-r--r--installerbuilder/libinstaller/packagemanagercore_p.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/installerbuilder/libinstaller/packagemanagercore_p.cpp b/installerbuilder/libinstaller/packagemanagercore_p.cpp
index 04c5f6fb1..5b6a4f687 100644
--- a/installerbuilder/libinstaller/packagemanagercore_p.cpp
+++ b/installerbuilder/libinstaller/packagemanagercore_p.cpp
@@ -2002,7 +2002,7 @@ bool PackageManagerCorePrivate::appendComponentsToUninstall(const QList<Componen
QList<Component*> autoDependOnList;
if (allResolved) {
// All regular dependees are resolved. Now we are looking for auto depend on components.
- foreach (Component *component, m_core->availableComponents()) {
+ foreach (Component *component, installedComponents) {
// If a components is installed and not yet scheduled for un-installation, check for auto depend.
if (component->isInstalled() && !m_componentsToUninstall.contains(component)) {
QStringList autoDependencies = component->autoDependencies();
@@ -2025,8 +2025,14 @@ bool PackageManagerCorePrivate::appendComponentsToUninstall(const QList<Componen
continue;
}
- foreach (Component *c, installedComponents)
- autoDependencies.removeAll(c->name());
+ foreach (Component *c, installedComponents) {
+ const QString replaces = c->value(scReplaces);
+ QStringList possibleNames = replaces.split(QRegExp(QLatin1String("\\b(,|, )\\b")),
+ QString::SkipEmptyParts);
+ possibleNames.append(c->name());
+ foreach (const QString &possibleName, possibleNames)
+ autoDependencies.removeAll(possibleName);
+ }
// A component requested auto installation, keep it to resolve their dependencies as well.
if (!autoDependencies.isEmpty())