]>
Commit | Line | Data |
---|---|---|
5f17b19f DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR="$(readlink -f "$(dirname "$0")")" | |
5 | . "$TESTDIR/framework" | |
6 | ||
7 | setupenvironment | |
08fcf962 | 8 | unset APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE |
5f17b19f DK |
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 | |
08fcf962 | 18 | apt-key list >/dev/null' > "${BUILDDIR}/debian/postinst" |
5f17b19f DK |
19 | buildpackage "$BUILDDIR" 'unstable' 'main' 'native' |
20 | rm -rf "$BUILDDIR" | |
21 | } | |
22 | buildingpkg 'aptkeyuser-nodepends' 'Depends: unrelated' | |
23 | buildingpkg 'aptkeyuser-depends' 'Depends: gnupg' | |
24 | ||
5f17b19f DK |
25 | insertinstalledpackage 'unrelated' 'native' '1' |
26 | insertinstalledpackage 'gnupg' 'native' '1' | |
92296fe4 | 27 | testdpkgnotinstalled 'aptkeyuser-depends' 'aptkeyuser-nodepends' |
5f17b19f | 28 | |
92296fe4 | 29 | testsuccess apt install ./incoming/aptkeyuser-depends_*.changes -y |
08fcf962 | 30 | cp rootdir/tmp/testsuccess.output apt.output |
92296fe4 | 31 | testdpkginstalled 'aptkeyuser-depends' |
08fcf962 DK |
32 | testfailure grep '^Warning: This will BREAK' apt.output |
33 | testsuccess grep '^Warning: apt-key' apt.output | |
5f17b19f | 34 | |
92296fe4 | 35 | testsuccess apt install ./incoming/aptkeyuser-nodepends_*.changes -y |
5f17b19f | 36 | cp rootdir/tmp/testsuccess.output apt.output |
92296fe4 | 37 | testdpkginstalled 'aptkeyuser-nodepends' |
5f17b19f | 38 | testsuccess grep '^Warning: This will BREAK' apt.output |
08fcf962 DK |
39 | testsuccess grep '^Warning: apt-key' apt.output |
40 | ||
41 | testsuccess aptkey list | |
42 | cp rootdir/tmp/testsuccess.output aptkey.list | |
43 | testsuccess grep '^Warning: apt-key' aptkey.list |