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