summaryrefslogtreecommitdiffstats
path: root/test/integration/test-bug-673536-pre-depends-breaks-loop
blob: 650866ee56c8556fd27074f3d8e8040131bf7df6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/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

testloopbreak() {
	rm -f rootdir/var/lib/dpkg/status 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'