]>
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 | |
a0c19a21 DK |
30 | testequal "Reading package lists... |
31 | Building dependency tree... | |
32 | Reading state information... | |
33 | The following package was automatically installed and is no longer required: | |
34 | po-debconf | |
35 | Use 'apt-get autoremove' to remove it. | |
36 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -s | |
37 | testequal "Reading package lists... | |
38 | Building dependency tree... | |
39 | Reading state information... | |
40 | 1 package was automatically installed and is no longer required. | |
41 | Use 'apt-get autoremove' to remove it. | |
42 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -s -o APT::Get::HideAutoRemove=small | |
01a6e24c DK |
43 | testdpkginstalled 'po-debconf' |
44 | ||
45 | echo 'APT::NeverAutoRemove { "^po-debconf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove | |
0440d936 | 46 | testsuccess aptget autoremove -y |
01a6e24c | 47 | testdpkginstalled 'po-debconf' |
b093a199 | 48 | |
01a6e24c | 49 | echo 'APT::NeverAutoRemove { "^po-.*$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove |
0440d936 | 50 | testsuccess aptget autoremove -y |
01a6e24c DK |
51 | testdpkginstalled "po-debconf" |
52 | ||
53 | rm rootdir/etc/apt/apt.conf.d/00autoremove | |
0440d936 | 54 | testsuccess aptget autoremove -y |
5cf733e1 | 55 | testdpkgnotinstalled 'po-debconf' |
ec7f904e | 56 | testmarkedauto |
b093a199 | 57 | |
a7250ed0 DK |
58 | 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 |
59 | testfileequal 'apt-history.log' ' | |
60 | Install: debhelper:i386 (8.0.0) | |
61 | Install: po-debconf:i386 (1.0.16, automatic) | |
62 | Install: unrelated:i386 (1) | |
b093a199 | 63 | Remove: debhelper:i386 (8.0.0) |
b093a199 | 64 | Remove: po-debconf:i386 (1.0.16)' |
8fa042ca DK |
65 | |
66 | testsuccess aptget install debhelper -y | |
67 | testdpkginstalled 'unrelated' 'debhelper' 'po-debconf' | |
68 | testsuccess aptmark auto debhelper | |
69 | ||
70 | testmarkedauto 'debhelper' 'po-debconf' | |
25b86db1 | 71 | testsuccessequal 'Reading package lists... |
8fa042ca DK |
72 | Building dependency tree... |
73 | Reading state information... | |
74 | The following packages will be REMOVED: | |
75 | debhelper po-debconf | |
76 | 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. | |
77 | Remv debhelper [8.0.0] | |
78 | Remv po-debconf [1.0.16]' aptget autoremove -s | |
a0c19a21 DK |
79 | testequal "Reading package lists... |
80 | Building dependency tree... | |
81 | Reading state information... | |
82 | The following packages were automatically installed and are no longer required: | |
83 | debhelper po-debconf | |
84 | Use 'apt-get autoremove' to remove them. | |
85 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -s | |
86 | testequal "Reading package lists... | |
87 | Building dependency tree... | |
88 | Reading state information... | |
89 | 2 packages were automatically installed and are no longer required. | |
90 | Use 'apt-get autoremove' to remove them. | |
91 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -s -o APT::Get::HideAutoRemove=small | |
8fa042ca DK |
92 | |
93 | testsuccess aptmark hold debhelper | |
25b86db1 | 94 | testsuccessequal 'Reading package lists... |
8fa042ca DK |
95 | Building dependency tree... |
96 | Reading state information... | |
97 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget autoremove -s |