mirror of
https://github.com/QuasarApp/installer-framework.git
synced 2025-05-04 01:09:33 +00:00
Fix essential package update
If there was essential update available and autodependency to already installed packages, the component containing autodependency was installed. If there was a Replaces at the same time, the Replaces was ignored. If there is an essential update, no other components should be installed nor updated except essentials and the components that have autodependency to essential component. Task-number: QTIFW-1215 Change-Id: Ib782335f98b6af6ec546aeecb9b032cf84254256 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
This commit is contained in:
parent
62eeab668c
commit
c706665c4f
@ -1255,6 +1255,18 @@ bool Component::isAutoDependOn(const QSet<QString> &componentsToInstall) const
|
||||
if (autoDependOnList.isEmpty())
|
||||
return false;
|
||||
|
||||
// If there is an essential update and autodepend on is not for essential
|
||||
// update component, do not add the autodependency to an installed component as
|
||||
// essential updates needs to be installed first, otherwise non-essential components
|
||||
// will be installed
|
||||
if (packageManagerCore()->foundEssentialUpdate()) {
|
||||
const QSet<QString> autoDependOnSet = autoDependOnList.toSet();
|
||||
if (autoDependOnSet.intersects(componentsToInstall)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QSet<QString> components = componentsToInstall;
|
||||
const QStringList installedPackages = d->m_core->localInstalledPackages().keys();
|
||||
foreach (const QString &name, installedPackages)
|
||||
|
Loading…
x
Reference in New Issue
Block a user