diff options
author | Julian Andres Klode <jak@debian.org> | 2023-07-11 13:47:17 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2023-07-11 13:47:17 +0000 |
commit | 7bb2b81090b1a5bd9ebb49a0d9fd5cfd9ddab95f (patch) | |
tree | c7b46bfd6100fd4634fdfa00a39336ad57a10c83 /test | |
parent | 50efb65f339e715e04af114bca44c9b8c53ad3ad (diff) | |
parent | 68ef41ea912f4879b0ee43419c13a3a8c9bfcd22 (diff) |
Merge branch 'pu/ubuntu-bug-2025462' into 'main'
dist-upgrade: Revert phased updates using keeps only
See merge request apt-team/apt!299
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/test-phased-updates-new-depends | 96 | ||||
-rwxr-xr-x | test/integration/test-ubuntu-bug-2025462-phased-dist-upgrade | 50 |
2 files changed, 146 insertions, 0 deletions
diff --git a/test/integration/test-phased-updates-new-depends b/test/integration/test-phased-updates-new-depends new file mode 100755 index 000000000..8cc9314ad --- /dev/null +++ b/test/integration/test-phased-updates-new-depends @@ -0,0 +1,96 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" + +setupenvironment +echo 'Debug::Phasing "1";' > rootdir/etc/apt/apt.conf.d/debug-phasing +configarchitecture 'i386' + +insertinstalledpackage 'has-new-depends' 'all' '1' '' +insertinstalledpackage 'has-new-recommends' 'all' '1' '' +insertinstalledpackage 'has-new-conflicts' 'all' '1' '' +insertinstalledpackage 'new-conflicts' 'all' '1' '' + +insertpackage 'unstable-updates' 'new-depends' 'all' '2' +insertpackage 'unstable-updates' 'new-recommends' 'all' '2' +insertpackage 'unstable-updates' 'has-new-depends' 'all' '2' 'Phased-Update-Percentage: 0 +Depends: new-depends' +insertpackage 'unstable-updates' 'has-new-recommends' 'all' '2' 'Phased-Update-Percentage: 0 +Recommends: new-recommends' +insertpackage 'unstable-updates' 'has-new-conflicts' 'all' '2' 'Phased-Update-Percentage: 0 +Conflicts: new-conflicts' + +setupaptarchive + + +testsuccessequal "Reading package lists... +Building dependency tree... +Calculating upgrade... +The following packages have been kept back: + has-new-conflicts has-new-depends has-new-recommends +0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded." aptget upgrade -s -q -o APT::Get::Always-Include-Phased-Updates=1 + +testsuccessequal "Reading package lists... +Building dependency tree... +Calculating upgrade... +The following packages have been kept back: + has-new-conflicts has-new-depends has-new-recommends +0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded." aptget upgrade -s -q + + +testsuccessequal "Reading package lists... +Building dependency tree... +Calculating upgrade... +The following NEW packages will be installed: + new-depends new-recommends +The following packages have been kept back: + has-new-conflicts +The following packages will be upgraded: + has-new-depends has-new-recommends +2 upgraded, 2 newly installed, 0 to remove and 1 not upgraded. +Inst new-depends (2 unstable-updates [all]) +Inst has-new-depends [1] (2 unstable-updates [all]) +Inst has-new-recommends [1] (2 unstable-updates [all]) +Inst new-recommends (2 unstable-updates [all]) +Conf new-depends (2 unstable-updates [all]) +Conf has-new-depends (2 unstable-updates [all]) +Conf has-new-recommends (2 unstable-updates [all]) +Conf new-recommends (2 unstable-updates [all])" aptget upgrade -s -q --with-new-pkgs -o APT::Get::Always-Include-Phased-Updates=1 + +testsuccessequal "Reading package lists... +Building dependency tree... +Calculating upgrade... +The following packages have been kept back: + has-new-conflicts has-new-depends has-new-recommends +0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded." aptget upgrade -s -q --with-new-pkgs + +: testsuccessequal "Reading package lists... +Building dependency tree... +Calculating upgrade... +The following packages will be REMOVED: + new-conflicts +The following NEW packages will be installed: + new-depends new-recommends +The following packages will be upgraded: + has-new-conflicts has-new-depends has-new-recommends +3 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. +Remv new-conflicts [1] +Inst has-new-conflicts [1] (2 unstable-updates [all]) +Inst new-depends (2 unstable-updates [all]) +Inst has-new-depends [1] (2 unstable-updates [all]) +Inst has-new-recommends [1] (2 unstable-updates [all]) +Inst new-recommends (2 unstable-updates [all]) +Conf has-new-conflicts (2 unstable-updates [all]) +Conf new-depends (2 unstable-updates [all]) +Conf has-new-depends (2 unstable-updates [all]) +Conf has-new-recommends (2 unstable-updates [all]) +Conf new-recommends (2 unstable-updates [all])" aptget dist-upgrade -s -q -o APT::Get::Always-Include-Phased-Updates=1 + +testsuccessequal "Reading package lists... +Building dependency tree... +Calculating upgrade... +The following packages have been kept back: + has-new-conflicts has-new-depends has-new-recommends +0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded." aptget dist-upgrade -s -q diff --git a/test/integration/test-ubuntu-bug-2025462-phased-dist-upgrade b/test/integration/test-ubuntu-bug-2025462-phased-dist-upgrade new file mode 100755 index 000000000..eecadcda3 --- /dev/null +++ b/test/integration/test-ubuntu-bug-2025462-phased-dist-upgrade @@ -0,0 +1,50 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" + +setupenvironment +echo 'Debug::Phasing "1";' > rootdir/etc/apt/apt.conf.d/debug-phasing +configarchitecture 'i386' + +insertinstalledpackage 'gnome-shell' 'all' '1' 'Depends: mutter (>= 1), gnome-shell-common (= 1)' +insertinstalledpackage 'gnome-shell-common' 'all' '1' +insertinstalledpackage 'mutter' 'all' '1' + +insertpackage 'unstable-updates' 'gnome-shell-common' 'all' '2' 'Phased-Update-Percentage: 100' +insertpackage 'unstable-updates' 'gnome-shell' 'all' '2' 'Phased-Update-Percentage: 100 +Depends: mutter (>= 2), gnome-shell-common (= 2)' +insertpackage 'unstable-updates' 'mutter' 'all' '2' 'Phased-Update-Percentage: 0' + +setupaptarchive + +# This is the broken test case: +# +# The following packages will be REMOVED: +# gnome-shell +# The following packages have been kept back: +# mutter +# The following packages will be upgraded: +# gnome-shell-common +# 1 upgraded, 0 newly installed, 1 to remove and 1 not upgraded. + +testsuccessequal "Reading package lists... +Building dependency tree... +Calculating upgrade... +The following packages have been kept back: + gnome-shell gnome-shell-common mutter +0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded." aptget dist-upgrade -s -q + +testsuccessequal "Reading package lists... +Building dependency tree... +Calculating upgrade... +The following packages will be upgraded: + gnome-shell gnome-shell-common mutter +3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Inst mutter [1] (2 unstable-updates [all]) +Inst gnome-shell [1] (2 unstable-updates [all]) [] +Inst gnome-shell-common [1] (2 unstable-updates [all]) +Conf mutter (2 unstable-updates [all]) +Conf gnome-shell (2 unstable-updates [all]) +Conf gnome-shell-common (2 unstable-updates [all])" aptget dist-upgrade -s -q -o APT::Get::Always-Include-Phased-Updates=1 |