summaryrefslogtreecommitdiff
path: root/test/integration/test-external-installation-planer-protocol
blob: 605efcd7b1e0422db5a256bcb3e25cfae75a7884 (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
#!/bin/sh
set -e

TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'

buildsimplenativepackage 'libfoo' 'amd64' '3' 'experimental' 'Multi-Arch: same'
buildsimplenativepackage 'foo' 'all' '3' 'experimental' 'Depends: newstuff'
buildsimplenativepackage 'foo' 'all' '2' 'unstable' 'Depends: libfoo:amd64, stuff
Conflicts: bar, libfoo:i386
Recommends: unrelated'
buildsimplenativepackage 'libfoo' 'amd64' '2' 'unstable' 'Multi-Arch: same'
buildsimplenativepackage 'unrelated-2' 'amd64' '2' 'unstable'
insertinstalledpackage 'foo' 'all' '1'
insertinstalledpackage 'bar' 'all' '1'
insertinstalledpackage 'stuff' 'all' '1'
insertinstalledpackage 'unrelated-1' 'all' '1'

setupaptarchive --no-update

testsuccess apt update
export APT_EDSP_DUMP_FILENAME="${TMPWORKINGDIRECTORY}/eipp.dump"
testfailure aptget install foo --planer dump -y
testfailure grep 'unrelated-2' "$APT_EDSP_DUMP_FILENAME"
testsuccessequal '2' grep -c '^Package: foo$' "$APT_EDSP_DUMP_FILENAME"
testsuccessequal '1' grep -c '^Package: libfoo$' "$APT_EDSP_DUMP_FILENAME"
#less "$APT_EDSP_DUMP_FILENAME"

aptget install foo -ys #--planer apt