]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-key-used-in-maintainerscript
tests: disable EIPP logging in test-compressed-indexes
[apt.git] / test / integration / test-apt-key-used-in-maintainerscript
CommitLineData
5f17b19f
DK
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6
7setupenvironment
08fcf962 8unset APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE
5f17b19f
DK
9configarchitecture 'native'
10configdpkgnoopchroot
11
12buildingpkg() {
13 local PKG="$1"
14 shift
15 setupsimplenativepackage "$PKG" 'native' '1' 'unstable' "$@"
16 BUILDDIR="incoming/${PKG}-1"
17 echo '#!/bin/sh
08fcf962 18apt-key list >/dev/null' > "${BUILDDIR}/debian/postinst"
5f17b19f
DK
19 buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
20 rm -rf "$BUILDDIR"
21}
22buildingpkg 'aptkeyuser-nodepends' 'Depends: unrelated'
23buildingpkg 'aptkeyuser-depends' 'Depends: gnupg'
24
25setupaptarchive
26
27insertinstalledpackage 'unrelated' 'native' '1'
28insertinstalledpackage 'gnupg' 'native' '1'
29
30testsuccess apt install aptkeyuser-depends -y
08fcf962
DK
31cp rootdir/tmp/testsuccess.output apt.output
32testfailure grep '^Warning: This will BREAK' apt.output
33testsuccess grep '^Warning: apt-key' apt.output
5f17b19f
DK
34
35testsuccess apt install aptkeyuser-nodepends -y
36cp rootdir/tmp/testsuccess.output apt.output
37testsuccess grep '^Warning: This will BREAK' apt.output
08fcf962
DK
38testsuccess grep '^Warning: apt-key' apt.output
39
40testsuccess aptkey list
41cp rootdir/tmp/testsuccess.output aptkey.list
42testsuccess grep '^Warning: apt-key' aptkey.list