diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2024-05-19 17:42:34 +0200 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2024-05-24 17:01:55 +0200 |
| commit | acb77872861834d3c5b98ca2e81e0336a388e9f0 (patch) | |
| tree | f276d3082cfc2d3ded7bf6dc556113b733437154 /test/integration | |
| parent | b5997949909ee9d5e9981c8311aea97c7b2620fd (diff) | |
solver3: Try candidate before installed version on upgrade
This fixes --no-strict-pinning attempting to upgrade all the versions
on the system. Adjust the upgrade test case accordingly:
1) no-strict-pinning pulls in systemd despite it being pinned down due
to a dependenc (this was true before this fix)
2) no-strict-pinning does not pull in the upgrade-simple because nothing
depends on it (this is what the test fixes)
Diffstat (limited to 'test/integration')
| -rwxr-xr-x | test/integration/test-apt-get-upgrade | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/test/integration/test-apt-get-upgrade b/test/integration/test-apt-get-upgrade index 9fb2b41d1..c9e56d97d 100755 --- a/test/integration/test-apt-get-upgrade +++ b/test/integration/test-apt-get-upgrade @@ -167,3 +167,54 @@ Conf upgrade-with-conflict (2.0 unstable [all]) Conf new-dep (1.0 stable [all]) Conf upgrade-simple (2.0 unstable [all]) Conf upgrade-with-new-dep (2.0 unstable [all])' aptget -s dist-upgrade + +# --no-strict-pinning pulls in systemd due to the dependency +testsuccessequal 'Reading package lists... +Building dependency tree... +Calculating upgrade... +The following packages will be REMOVED: + conflicting-dep +The following NEW packages will be installed: + new-dep systemd +The following packages will be upgraded: + init upgrade-simple upgrade-with-conflict upgrade-with-new-dep +4 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. +Remv conflicting-dep [1.0] +Inst systemd (2 unstable [all]) +Conf systemd (2 unstable [all]) +Inst init [1] (2 unstable [all]) +Inst upgrade-with-conflict [1.0] (2.0 unstable [all]) +Inst new-dep (1.0 stable [all]) +Inst upgrade-simple [1.0] (2.0 unstable [all]) +Inst upgrade-with-new-dep [1.0] (2.0 unstable [all]) +Conf init (2 unstable [all]) +Conf upgrade-with-conflict (2.0 unstable [all]) +Conf new-dep (1.0 stable [all]) +Conf upgrade-simple (2.0 unstable [all]) +Conf upgrade-with-new-dep (2.0 unstable [all])' aptget -s dist-upgrade --no-strict-pinning --solver 3.0 + +# --no-strict-pinning does not cause a package to be upgraded on its own, though. +echo 'Package: upgrade-simple +Pin: release unstable +Pin-Priority: -1' > rootdir/etc/apt/preferences.d/no-strict-pinning.pref +testsuccessequal 'Reading package lists... +Building dependency tree... +Calculating upgrade... +The following packages will be REMOVED: + conflicting-dep +The following NEW packages will be installed: + new-dep systemd +The following packages will be upgraded: + init upgrade-with-conflict upgrade-with-new-dep +3 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. +Remv conflicting-dep [1.0] +Inst systemd (2 unstable [all]) +Conf systemd (2 unstable [all]) +Inst init [1] (2 unstable [all]) +Inst upgrade-with-conflict [1.0] (2.0 unstable [all]) +Inst new-dep (1.0 stable [all]) +Inst upgrade-with-new-dep [1.0] (2.0 unstable [all]) +Conf init (2 unstable [all]) +Conf upgrade-with-conflict (2.0 unstable [all]) +Conf new-dep (1.0 stable [all]) +Conf upgrade-with-new-dep (2.0 unstable [all])' aptget -s dist-upgrade --no-strict-pinning --solver 3.0 |
