]>
git.saurik.com Git - apt.git/blob - test/integration/test-bug-769609-triggers-still-pending-after-run
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
8 configarchitecture 'amd64'
10 msgtest 'Check if installed dpkg supports' 'noawait trigger'
11 if dpkg-checkbuilddeps -d 'dpkg (>= 1.16.1)' /dev/null; then
14 msgskip 'dpkg version too old'
19 buildtriggerpackages() {
21 setupsimplenativepackage "triggerable
-$TYPE" 'all' '1.0' 'unstable' "Depends
: trigdepends
-$TYPE"
22 BUILDDIR="incoming
/triggerable
-${TYPE}-1.0
"
23 cat >"${BUILDDIR}/debian
/postinst
" <<EOF
25 if [ "\
$1" = 'triggered' ]; then
29 echo "$TYPE /usr
/share
/doc
" > "${BUILDDIR}/debian
/triggers
"
30 buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
32 buildsimplenativepackage "trigdepends
-$TYPE" 'all' '1.0' 'unstable'
35 #buildtriggerpackages 'interest'
36 buildtriggerpackages 'interest-noawait'
37 buildsimplenativepackage "trigstuff
" 'all' '1.0' 'unstable'
43 msgmsg 'Working with trigger type' "$TYPE"
44 testsuccess aptget install triggerable-$TYPE -y
45 cp rootdir/tmp/testsuccess.output terminal.output
46 testsuccess grep '^REWRITE ' terminal.output
47 testdpkginstalled triggerable-$TYPE trigdepends-$TYPE
49 testsuccess aptget install trigdepends-$TYPE -y --reinstall
50 cp rootdir/tmp/testsuccess.output terminal.output
51 testsuccess grep '^REWRITE ' terminal.output
52 testsuccess grep ' root root ' terminal.output
53 testdpkginstalled triggerable-$TYPE trigdepends-$TYPE
55 testsuccess aptget install trigstuff -y
56 cp rootdir/tmp/testsuccess.output terminal.output
57 testsuccess grep '^REWRITE ' terminal.output
58 testsuccess grep ' root root ' terminal.output
59 testdpkginstalled triggerable-$TYPE trigdepends-$TYPE trigstuff
61 testsuccess aptget purge trigstuff -y
62 cp rootdir/tmp/testsuccess.output terminal.output
63 testsuccess grep '^REWRITE ' terminal.output
64 testsuccess grep ' root root ' terminal.output
65 testdpkginstalled triggerable-$TYPE trigdepends-$TYPE
66 testdpkgnotinstalled trigstuff
68 testsuccess aptget purge trigdepends-$TYPE -y
69 cp rootdir/tmp/testsuccess.output terminal.output
70 testfailure grep '^REWRITE ' terminal.output
71 testfailure grep ' root root ' terminal.output
72 testdpkgnotinstalled triggerable-$TYPE trigdepends-$TYPE
75 runtests 'interest-noawait'