diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2024-07-01 16:27:15 +0200 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2024-07-01 16:28:53 +0200 |
| commit | b636668788fe8b1f7183b21eaf7b87f34209169e (patch) | |
| tree | 0b8db4d36be442227318780bd4665fe948a81433 /test/integration/test-solver3-dependencies | |
| parent | 053c889838bdc2c6efd3a542ec3dfd547a5df53e (diff) | |
solver3: Do not accidentally promote Replaces and Enhances to dependencies
As part of the refactoring, we allowed the code to work on unimportant
dependencies as we needed to promote Suggests to Depends if they are
currently satisfied.
However, Replaces and Enhances were not considered properly and both
are not negative dependencies so they were accidentally promoted to
Depends too if they were currently satisfied.
Diffstat (limited to 'test/integration/test-solver3-dependencies')
| -rwxr-xr-x | test/integration/test-solver3-dependencies | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/test/integration/test-solver3-dependencies b/test/integration/test-solver3-dependencies new file mode 100755 index 000000000..330ded8f9 --- /dev/null +++ b/test/integration/test-solver3-dependencies @@ -0,0 +1,65 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" +setupenvironment +configarchitecture 'amd64' + +insertinstalledpackage 'replaces' 'all' '2' 'Replaces: replaced (<< 3)' +insertinstalledpackage 'replaced' 'all' '2' + +insertinstalledpackage 'enhances' 'all' '2' 'Enhances: enhanced (<< 3)' +insertinstalledpackage 'enhanced' 'all' '2' + +insertpackage 'unstable' 'replaces' 'all' '3' 'Replaces: replaced (<< 3)' +insertpackage 'unstable' 'enhances' 'all' '3' 'Enhances: enhanced (<< 3)' +insertpackage 'unstable' 'replaced' 'all' '3' +insertpackage 'unstable' 'enhanced' 'all' '3' + +setupaptarchive + +testsuccessequal "Reading package lists... +Building dependency tree... +Calculating upgrade... +The following packages will be upgraded: + enhanced enhances replaced replaces +4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Inst enhanced [2] (3 unstable [all]) +Inst enhances [2] (3 unstable [all]) +Inst replaced [2] (3 unstable [all]) +Inst replaces [2] (3 unstable [all]) +Conf enhanced (3 unstable [all]) +Conf enhances (3 unstable [all]) +Conf replaced (3 unstable [all]) +Conf replaces (3 unstable [all])" aptget upgrade -s + +testsuccessequal "Reading package lists... +Building dependency tree... +Calculating upgrade... +The following packages will be upgraded: + enhanced enhances replaced replaces +4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Inst enhanced [2] (3 unstable [all]) +Inst enhances [2] (3 unstable [all]) +Inst replaced [2] (3 unstable [all]) +Inst replaces [2] (3 unstable [all]) +Conf enhanced (3 unstable [all]) +Conf enhances (3 unstable [all]) +Conf replaced (3 unstable [all]) +Conf replaces (3 unstable [all])" apt upgrade -s + +testsuccessequal "Reading package lists... +Building dependency tree... +Calculating upgrade... +The following packages will be upgraded: + enhanced enhances replaced replaces +4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Inst enhanced [2] (3 unstable [all]) +Inst enhances [2] (3 unstable [all]) +Inst replaced [2] (3 unstable [all]) +Inst replaces [2] (3 unstable [all]) +Conf enhanced (3 unstable [all]) +Conf enhances (3 unstable [all]) +Conf replaced (3 unstable [all]) +Conf replaces (3 unstable [all])" apt dist-upgrade -s |
