summaryrefslogtreecommitdiffstats
path: root/test/integration/test-bug-673536-pre-depends-breaks-loop
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 06:14:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 06:14:41 +0000
commit549a391d6438e828001eeeaf235b080c054a7bf3 (patch)
tree1bb6b1ea5987fa167a1d13abe82209cc882dd94b /test/integration/test-bug-673536-pre-depends-breaks-loop
parentInitial commit. (diff)
downloadapt-upstream.tar.xz
apt-upstream.zip
Adding upstream version 2.2.4.upstream/2.2.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/integration/test-bug-673536-pre-depends-breaks-loop')
-rwxr-xr-xtest/integration/test-bug-673536-pre-depends-breaks-loop36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/integration/test-bug-673536-pre-depends-breaks-loop b/test/integration/test-bug-673536-pre-depends-breaks-loop
new file mode 100755
index 0000000..a4cf669
--- /dev/null
+++ b/test/integration/test-bug-673536-pre-depends-breaks-loop
@@ -0,0 +1,36 @@
+#!/bin/sh
+set -e
+
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
+setupenvironment
+configarchitecture 'native'
+
+buildsimplenativepackage 'advanced' 'native' '1' 'stable'
+buildsimplenativepackage 'advanced' 'native' '2' 'unstable' 'Pre-Depends: basic'
+buildsimplenativepackage 'basic' 'native' '2' 'unstable' 'Pre-Depends: common'
+
+buildsimplenativepackage 'common' 'native' '2~conflict' 'unstable-conflict' 'Conflicts: advanced (<= 1)'
+buildsimplenativepackage 'common' 'native' '2~break' 'unstable-break' 'Breaks: advanced (<= 1)'
+
+setupaptarchive
+
+# we check with 'real' packages here as the simulation reports a 'Conf broken'
+# which is technical correct for the simulation, but testing errormsg is ugly
+
+cp -a rootdir/var/lib/dpkg/status dpkg.status.backup
+
+testloopbreak() {
+ cp -a dpkg.status.backup rootdir/var/lib/dpkg/status
+ rm -f rootdir/var/lib/apt/extended_states
+
+ testsuccess aptget install advanced=1 -y -t "$1"
+ testdpkginstalled advanced
+ testdpkgnotinstalled basic common
+
+ testsuccess aptget dist-upgrade -y -t "$1"
+ testdpkginstalled advanced basic common
+}
+
+testloopbreak 'unstable-break'
+testloopbreak 'unstable-conflict'