]>
Commit | Line | Data |
---|---|---|
b093a199 DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
9962ae93 | 4 | TESTDIR=$(readlink -f $(dirname $0)) |
b093a199 DK |
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 | ||
0440d936 | 14 | testsuccess aptget install unrelated debhelper -y |
01a6e24c | 15 | testdpkginstalled 'unrelated' 'debhelper' 'po-debconf' |
b093a199 | 16 | |
ec7f904e | 17 | testmarkedauto 'po-debconf' |
0440d936 | 18 | testsuccess aptget remove debhelper -y |
5cf733e1 | 19 | testdpkgnotinstalled 'debhelper' |
87bc1c45 | 20 | testdpkginstalled 'po-debconf' 'unrelated' |
01a6e24c DK |
21 | |
22 | echo 'APT::NeverAutoRemove { "^debc.*nf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove | |
25b86db1 | 23 | testsuccessequal 'Reading package lists... |
01a6e24c DK |
24 | Building dependency tree... |
25 | Reading state information... | |
26 | The following packages will be REMOVED: | |
27 | po-debconf | |
28 | 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. | |
29 | Remv po-debconf [1.0.16]' aptget autoremove -s | |
30 | testdpkginstalled 'po-debconf' | |
31 | ||
32 | echo 'APT::NeverAutoRemove { "^po-debconf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove | |
0440d936 | 33 | testsuccess aptget autoremove -y |
01a6e24c | 34 | testdpkginstalled 'po-debconf' |
b093a199 | 35 | |
01a6e24c | 36 | echo 'APT::NeverAutoRemove { "^po-.*$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove |
0440d936 | 37 | testsuccess aptget autoremove -y |
01a6e24c DK |
38 | testdpkginstalled "po-debconf" |
39 | ||
40 | rm rootdir/etc/apt/apt.conf.d/00autoremove | |
0440d936 | 41 | testsuccess aptget autoremove -y |
5cf733e1 | 42 | testdpkgnotinstalled 'po-debconf' |
ec7f904e | 43 | testmarkedauto |
b093a199 | 44 | |
a7250ed0 DK |
45 | sed rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' -e 's#), #)\nInstall: #g' | sort -u > apt-history.log |
46 | testfileequal 'apt-history.log' ' | |
47 | Install: debhelper:i386 (8.0.0) | |
48 | Install: po-debconf:i386 (1.0.16, automatic) | |
49 | Install: unrelated:i386 (1) | |
b093a199 | 50 | Remove: debhelper:i386 (8.0.0) |
b093a199 | 51 | Remove: po-debconf:i386 (1.0.16)' |
8fa042ca DK |
52 | |
53 | testsuccess aptget install debhelper -y | |
54 | testdpkginstalled 'unrelated' 'debhelper' 'po-debconf' | |
55 | testsuccess aptmark auto debhelper | |
56 | ||
57 | testmarkedauto 'debhelper' 'po-debconf' | |
25b86db1 | 58 | testsuccessequal 'Reading package lists... |
8fa042ca DK |
59 | Building dependency tree... |
60 | Reading state information... | |
61 | The following packages will be REMOVED: | |
62 | debhelper po-debconf | |
63 | 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. | |
64 | Remv debhelper [8.0.0] | |
65 | Remv po-debconf [1.0.16]' aptget autoremove -s | |
66 | ||
67 | testsuccess aptmark hold debhelper | |
25b86db1 | 68 | testsuccessequal 'Reading package lists... |
8fa042ca DK |
69 | Building dependency tree... |
70 | Reading state information... | |
71 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget autoremove -s |