]>
git.saurik.com Git - apt.git/blob - test/integration/test-external-installation-planner-protocol
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
5 NATIVE="$(command dpkg --print-architecture)"
8 configarchitecture "${NATIVE}"
10 buildsimplenativepackage 'libfoo' "${NATIVE}" '3' 'experimental' 'Multi-Arch: same'
11 buildsimplenativepackage 'foo' 'all' '3' 'experimental' 'Depends: newstuff'
12 buildsimplenativepackage 'foo' 'all' '2' 'unstable' "Depends
: libfoo
:$NATIVE, stuff
13 Conflicts
: bar
, libfoo
:i386
14 Recommends
: unrelated
"
15 buildsimplenativepackage 'libfoo' "${NATIVE}" '2' 'unstable' 'Multi-Arch: same'
16 buildsimplenativepackage 'unrelated-2' "${NATIVE}" '2' 'unstable'
17 insertinstalledpackage 'foo' 'all' '1'
18 insertinstalledpackage 'bar' 'all' '1'
19 insertinstalledpackage 'stuff' 'all' '1'
20 insertinstalledpackage 'unrelated-1' 'all' '1'
22 setupaptarchive --no-update
24 EIPPLOG="${TMPWORKINGDIRECTORY}/rootdir
/var
/log
/apt
/eipp.log
"
25 echo "Dir
::Log
::Planner
\"$EIPPLOG\";" > ./rootdir/etc/apt/apt.conf.d/eipp-logging
27 testsuccess apt update
28 export APT_EDSP_DUMP_FILENAME="${TMPWORKINGDIRECTORY}/downloaded
/dump.eipp
"
29 testfailure test -r "$EIPPLOG"
30 testfailure aptget install foo --planner dump -y
31 testfailure test -r "$EIPPLOG"
32 testfailure grep 'unrelated-2' "$APT_EDSP_DUMP_FILENAME"
33 testsuccessequal '2' grep -c '^Package: foo$' "$APT_EDSP_DUMP_FILENAME"
34 testsuccessequal '1' grep -c '^Package: libfoo$' "$APT_EDSP_DUMP_FILENAME"
35 testsuccessequal 'Planner: dump' grep '^Planner: ' "$APT_EDSP_DUMP_FILENAME"
37 testsuccess aptget install foo -s
38 testsuccess aptget install foo -y
39 testsuccess test -r "$EIPPLOG"
40 testsuccessequal "Request
: EIPP
0.1
41 Architecture
: ${NATIVE}
42 Architectures
: ${NATIVE}
44 Install
: libfoo
:${NATIVE} foo
:${NATIVE}
45 Planner
: internal
" head -n 6 "$EIPPLOG"
46 aptinternalplanner < "$EIPPLOG" > planner.log || true
47 testsuccessequal 'Remove: 6
51 Configure: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planner.log
54 testsuccess aptget install foo -s --reinstall
55 testsuccess aptget install foo -y --reinstall
56 testsuccess test -r "$EIPPLOG"
57 testsuccessequal "Request
: EIPP
0.1
58 Architecture
: ${NATIVE}
59 Architectures
: ${NATIVE}
60 ReInstall
: foo
:${NATIVE}
61 Planner
: internal
" head -n 5 "$EIPPLOG"
62 aptinternalplanner < "$EIPPLOG" > planner.log || true
63 testsuccessequal 'Unpack: 4
64 Configure: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planner.log
67 testsuccess aptget purge foo -s
68 testsuccess aptget purge foo -y
69 testsuccess test -r "$EIPPLOG"
70 testsuccessequal "Request
: EIPP
0.1
71 Architecture
: ${NATIVE}
72 Architectures
: ${NATIVE}
74 Planner
: internal
" head -n 5 "$EIPPLOG"
75 aptinternalplanner < "$EIPPLOG" > planner.log || true
76 testsuccessequal 'Remove: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planner.log