mirror of
https://github.com/QuasarApp/installer-framework.git
synced 2025-05-21 17:19:34 +00:00
Warn whenever (auto)dependencies are not leaf nodes.
Whenever any source or destination node of dependency link or any destination node of autodependency link has children, warn about it. Maintenance tool isn't able to handle such cases properly. Change-Id: Ifaf3fbb7903eb960ab8fd977c4f47b7906900115 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
parent
91b5f01dfb
commit
735b67dd8b
@ -88,6 +88,30 @@ QStringList ComponentChecker::checkComponent(Component *component)
|
||||
.arg(component->name());
|
||||
}
|
||||
}
|
||||
if (component->childCount()) {
|
||||
const QStringList autoDependencies = component->autoDependencies();
|
||||
if (!autoDependencies.isEmpty()) {
|
||||
checkResult << QString::fromLatin1("Component %1 auto depends on other components "
|
||||
"while having children components. This will not work properly.")
|
||||
.arg(component->name());
|
||||
}
|
||||
|
||||
// TODO: search also for components which autodepend on "component"
|
||||
// (something like core->autodependees(component))
|
||||
|
||||
if (!component->dependencies().isEmpty()) {
|
||||
checkResult << QString::fromLatin1("Component %1 depends on other components "
|
||||
"while having children components. This will not work properly.")
|
||||
.arg(component->name());
|
||||
}
|
||||
|
||||
PackageManagerCore *core = component->packageManagerCore();
|
||||
if (!core->dependees(component).isEmpty()) {
|
||||
checkResult << QString::fromLatin1("Other components depend on component %1 "
|
||||
"which has children components. This will not work properly.")
|
||||
.arg(component->name());
|
||||
}
|
||||
}
|
||||
}
|
||||
return checkResult;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user