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