]>
Commit | Line | Data |
---|---|---|
b093a199 DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | local TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | setupenvironment | |
01a6e24c | 7 | configarchitecture 'i386' |
b093a199 | 8 | |
01a6e24c DK |
9 | buildsimplenativepackage 'unrelated' 'all' '1' 'unstable' |
10 | buildsimplenativepackage 'po-debconf' 'all' '1.0.16' 'unstable' | |
11 | buildsimplenativepackage 'debhelper' 'all' '8.0.0' 'unstable' 'Depends: po-debconf' | |
b093a199 DK |
12 | setupaptarchive |
13 | ||
14 | aptget install unrelated debhelper -qq 2>&1 > /dev/null | |
01a6e24c | 15 | testdpkginstalled 'unrelated' 'debhelper' 'po-debconf' |
b093a199 | 16 | |
01a6e24c | 17 | testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: po-debconf |
b093a199 DK |
18 | Architecture: i386 |
19 | Auto-Installed: 1 | |
01a6e24c | 20 | ' |
b093a199 | 21 | aptget remove debhelper -y -qq 2>&1 > /dev/null |
01a6e24c DK |
22 | testdpkgnoninstalled 'debhelper' |
23 | testdpkginstalled 'po-debconf unrelated' | |
24 | ||
25 | echo 'APT::NeverAutoRemove { "^debc.*nf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove | |
26 | testequal 'Reading package lists... | |
27 | Building dependency tree... | |
28 | Reading state information... | |
29 | The following packages will be REMOVED: | |
30 | po-debconf | |
31 | 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. | |
32 | Remv po-debconf [1.0.16]' aptget autoremove -s | |
33 | testdpkginstalled 'po-debconf' | |
34 | ||
35 | echo 'APT::NeverAutoRemove { "^po-debconf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove | |
b093a199 | 36 | aptget autoremove -y -qq 2>&1 > /dev/null |
01a6e24c | 37 | testdpkginstalled 'po-debconf' |
b093a199 | 38 | |
01a6e24c DK |
39 | echo 'APT::NeverAutoRemove { "^po-.*$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove |
40 | aptget autoremove -y -qq 2>&1 > /dev/null | |
41 | testdpkginstalled "po-debconf" | |
42 | ||
43 | rm rootdir/etc/apt/apt.conf.d/00autoremove | |
44 | aptget autoremove -y -qq 2>&1 > /dev/null | |
45 | testdpkgnoninstalled 'po-debconf' | |
46 | ||
47 | testfileequal 'rootdir/var/lib/apt/extended_states' '' | |
b093a199 DK |
48 | |
49 | sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' | |
01a6e24c | 50 | testfileequal 'rootdir/var/log/apt/history.log' ' |
b093a199 DK |
51 | Install: unrelated:i386 (1), debhelper:i386 (8.0.0), po-debconf:i386 (1.0.16, automatic) |
52 | ||
53 | Remove: debhelper:i386 (8.0.0) | |
54 | ||
55 | Remove: po-debconf:i386 (1.0.16)' |