summaryrefslogtreecommitdiffstats
path: root/test/integration/test-ubuntu-bug-2025462-phased-dist-upgrade
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 09:59:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 09:59:37 +0000
commit76e2632459410dec81337edb6a9fee33c9a660f3 (patch)
treea73345df208eede4a4daad340515c9328f34625c /test/integration/test-ubuntu-bug-2025462-phased-dist-upgrade
parentInitial commit. (diff)
downloadapt-76e2632459410dec81337edb6a9fee33c9a660f3.tar.xz
apt-76e2632459410dec81337edb6a9fee33c9a660f3.zip
Adding upstream version 2.7.12.upstream/2.7.12
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/integration/test-ubuntu-bug-2025462-phased-dist-upgrade')
-rwxr-xr-xtest/integration/test-ubuntu-bug-2025462-phased-dist-upgrade52
1 files changed, 52 insertions, 0 deletions
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 0000000..5678642
--- /dev/null
+++ b/test/integration/test-ubuntu-bug-2025462-phased-dist-upgrade
@@ -0,0 +1,52 @@
+#!/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 upgrades have been deferred due to phasing:
+ mutter
+The following packages have been kept back:
+ gnome-shell gnome-shell-common
+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