summaryrefslogtreecommitdiffstats
path: root/tests/auto/installer/solver/tst_solver.cpp
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2022-05-03 11:59:21 +0300
committerKatja Marttila <katja.marttila@qt.io>2022-05-16 10:05:20 +0300
commit21de5f081ab3b18625febcd8ac181f6a122c4c7f (patch)
treeaafc927b1d4f379836aa2c7a386cfc04ca9b87b3 /tests/auto/installer/solver/tst_solver.cpp
parent82c175d76f1c40868b47f18d95376dce34e0416e (diff)
Do not install new dependencies for installed components
If component is updated to repository, and new dependencies are added, the dependencies should be installed only when fresh install to component is made or the component is updated. This change adds a new LocalDependencies value to component. It keeps track of the dependencies the local installed packages has. Fixes also a bug in uninstallecalculator, where we should also read the dependencies from local installed packages instead of newly introduced repositories. Task-number: QTIFW-2624 Change-Id: I0557e5adf1e87c0a1238cc455cfb2c90f6b05c87 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'tests/auto/installer/solver/tst_solver.cpp')
-rw-r--r--tests/auto/installer/solver/tst_solver.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/installer/solver/tst_solver.cpp b/tests/auto/installer/solver/tst_solver.cpp
index 45fadc4e6..8b5d1fdcf 100644
--- a/tests/auto/installer/solver/tst_solver.cpp
+++ b/tests/auto/installer/solver/tst_solver.cpp
@@ -252,7 +252,7 @@ private slots:
QTest::addColumn<QList<Component *> >("installedComponents");
QTest::addColumn<QSet<Component *> >("expectedResult");
QTest::addColumn<UninstallReasonList >("uninstallReasons");
- QTest::addColumn<DependencyHash >("dependencyHash");
+ QTest::addColumn<LocalDependencyHash >("dependencyHash");
UninstallReasonList uninstallReasonList;
PackageManagerCore *core = new PackageManagerCore();
@@ -317,7 +317,7 @@ private slots:
QFETCH(QList<Component *> , installedComponents);
QFETCH(QSet<Component *> , expectedResult);
QFETCH(UninstallReasonList, uninstallReasons);
- QFETCH(DependencyHash, dependencyHash);
+ QFETCH(LocalDependencyHash, dependencyHash);
UninstallerCalculator calc(installedComponents, core, QHash<QString, QStringList>(), dependencyHash, QStringList());
calc.appendComponentsToUninstall(selectedToUninstall);