diff options
author | Tim Jenssen <tim.jenssen@nokia.com> | 2011-11-17 12:30:51 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@nokia.com> | 2011-11-21 12:11:27 +0100 |
commit | f5eedc9e48fe03a804a70c16ab61bc3506e5aaf6 (patch) | |
tree | 545fca2d91429a62ba2e971171699ae40d6e92e5 /installerbuilder/libinstaller/packagemanagercore_p.cpp | |
parent | 653bac34d7d03d581657ad781e6bdb89713a8a12 (diff) |
fix autodependency behaviour
- remove code that autodependency is a real dependency, it was a hack and totaly wrong
- introduce addDependency() to be able to add these operating system depend, for example you need vcredist to register Qt Simulator under Windows but not under the other OSs(the wrong autodependency was only a hack to allow this)
Change-Id: Iab6adc28d47b42eac1823afe7fe6a8bbfb2b3361
Reviewed-by: Niels Weber <niels.2.weber@nokia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'installerbuilder/libinstaller/packagemanagercore_p.cpp')
-rw-r--r-- | installerbuilder/libinstaller/packagemanagercore_p.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/installerbuilder/libinstaller/packagemanagercore_p.cpp b/installerbuilder/libinstaller/packagemanagercore_p.cpp index e3c1c7754..bc1e83964 100644 --- a/installerbuilder/libinstaller/packagemanagercore_p.cpp +++ b/installerbuilder/libinstaller/packagemanagercore_p.cpp @@ -330,20 +330,6 @@ bool PackageManagerCorePrivate::appendComponentsToInstall(const QList<Component* relevantComponentForAutoDependOn += component->childComponents(true, AllMode); } - //build a data structure to be able to use autodependency as normal dependency - m_autoDependOnDependencies.clear(); - foreach (Component *component, relevantComponentForAutoDependOn) { - foreach (const QString componentName, component->autoDependencies()) { - Component *componentWithAutoDependOnInspector = m_core->componentByName(componentName); - if (componentWithAutoDependOnInspector != 0) { - QSet<QString> dependencyStringSet = m_autoDependOnDependencies.value(component); - dependencyStringSet.insert(componentWithAutoDependOnInspector->name()); - m_autoDependOnDependencies.insert(component, dependencyStringSet); - } - - } - } - QList<Component*> notAppendedComponents; // for example components with unresolved dependencies foreach (Component *component, components){ if (m_toInstallComponentIds.contains(component->name())) { @@ -356,7 +342,7 @@ bool PackageManagerCorePrivate::appendComponentsToInstall(const QList<Component* return false; } - if (component->dependencies().isEmpty() && m_autoDependOnDependencies.value(component).isEmpty()) + if (component->dependencies().isEmpty()) realAppendToInstallComponents(component); else notAppendedComponents.append(component); @@ -390,8 +376,7 @@ bool PackageManagerCorePrivate::appendComponentsToInstall(const QList<Component* bool PackageManagerCorePrivate::appendComponentToInstall(Component *component) { - QSet<QString> allDependencies = component->dependencies().toSet() - + m_autoDependOnDependencies.value(component); + QSet<QString> allDependencies = component->dependencies().toSet(); foreach (const QString &dependencyComponentName, allDependencies) { //componentByName return 0 if dependencyComponentName contains a version which is not available |