]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-key-used-in-maintainerscript
better error message for insufficient hashsums
[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
8configarchitecture 'native'
9configdpkgnoopchroot
10
11buildingpkg() {
12 local PKG="$1"
13 shift
14 setupsimplenativepackage "$PKG" 'native' '1' 'unstable' "$@"
15 BUILDDIR="incoming/${PKG}-1"
16 echo '#!/bin/sh
17apt-key list' > "${BUILDDIR}/debian/postinst"
18 buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
19 rm -rf "$BUILDDIR"
20}
21buildingpkg 'aptkeyuser-nodepends' 'Depends: unrelated'
22buildingpkg 'aptkeyuser-depends' 'Depends: gnupg'
23
24setupaptarchive
25
26insertinstalledpackage 'unrelated' 'native' '1'
27insertinstalledpackage 'gnupg' 'native' '1'
28
29testsuccess apt install aptkeyuser-depends -y
30testfailure grep '^Warning: This will BREAK' rootdir/tmp/testsuccess.output
31
32testsuccess apt install aptkeyuser-nodepends -y
33cp rootdir/tmp/testsuccess.output apt.output
34testsuccess grep '^Warning: This will BREAK' apt.output