]>
Commit | Line | Data |
---|---|---|
eb76e936 DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | setupenvironment | |
7 | configarchitecture "i386" | |
8 | ||
9 | buildsimplenativepackage "peace-dpkg" "all" "1.0" "stable" | |
10 | ||
11 | buildsimplenativepackage "a" "all" "1.0" "stable" "Depends: b" | |
12 | buildsimplenativepackage "b" "all" "1.0" "stable" | |
13 | buildsimplenativepackage "c" "all" "1.0" "stable" "Depends: b" | |
14 | ||
15 | setupaptarchive | |
16 | ||
17 | # dpkg freaks out if the last package is removed so keep one around | |
18 | aptget install peace-dpkg -y -qq 2>&1 > /dev/null | |
19 | testdpkginstalled peace-dpkg | |
20 | testfileequal 'rootdir/var/lib/apt/extended_states' '' | |
21 | ||
22 | aptget install a -y -qq 2>&1 > /dev/null | |
23 | testdpkginstalled a b | |
24 | testdpkgnotinstalled c | |
25 | testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b | |
26 | Architecture: i386 | |
27 | Auto-Installed: 1 | |
28 | ' | |
29 | ||
30 | aptget remove a -y -qq 2>&1 > /dev/null | |
31 | testdpkgnotinstalled a c | |
32 | testdpkginstalled b | |
33 | testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b | |
34 | Architecture: i386 | |
35 | Auto-Installed: 1 | |
36 | ' | |
37 | ||
38 | aptget install c -y -qq 2>&1 > /dev/null | |
39 | testdpkgnotinstalled a | |
40 | testdpkginstalled b c | |
41 | testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b | |
42 | Architecture: i386 | |
43 | Auto-Installed: 1 | |
44 | ' | |
45 | ||
46 | testequal 'Reading package lists... | |
47 | Building dependency tree... | |
48 | Reading state information... | |
49 | b is already the newest version. | |
50 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b --only-upgrade | |
51 | testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b | |
52 | Architecture: i386 | |
53 | Auto-Installed: 1 | |
54 | ' | |
55 | ||
56 | testequal 'Reading package lists... | |
57 | Building dependency tree... | |
58 | Reading state information... | |
59 | b is already the newest version. | |
60 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b -d | |
61 | testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b | |
62 | Architecture: i386 | |
63 | Auto-Installed: 1 | |
64 | ' | |
65 | ||
66 | aptget install b --reinstall -y -qq 2>&1 > /dev/null | |
67 | testdpkgnotinstalled a | |
68 | testdpkginstalled b c | |
69 | testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b | |
70 | Architecture: i386 | |
71 | Auto-Installed: 1 | |
72 | ' | |
73 | ||
74 | testequal 'Reading package lists... | |
75 | Building dependency tree... | |
76 | Reading state information... | |
77 | b is already the newest version. | |
78 | b set to manually installed. | |
79 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b | |
80 | testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b | |
81 | Architecture: i386 | |
82 | Auto-Installed: 0 | |
83 | ' | |
84 | ||
85 | aptget remove b -y -qq 2>&1 > /dev/null | |
86 | testdpkgnotinstalled a b c | |
87 | testfileequal 'rootdir/var/lib/apt/extended_states' '' | |
88 | ||
89 | aptget install a b -y -qq 2>&1 > /dev/null | |
90 | testdpkginstalled a b | |
91 | testdpkgnotinstalled c | |
92 | testfileequal 'rootdir/var/lib/apt/extended_states' '' | |
93 | ||
94 | aptget purge a b -y -qq 2>&1 > /dev/null | |
95 | testdpkgnotinstalled a b c | |
96 | testfileequal 'rootdir/var/lib/apt/extended_states' '' | |
97 | ||
98 | aptget install b c -y -qq 2>&1 > /dev/null | |
99 | testdpkgnotinstalled a | |
100 | testdpkginstalled b c | |
101 | testfileequal 'rootdir/var/lib/apt/extended_states' '' | |
102 | ||
103 | aptget install a -y -qq 2>&1 > /dev/null | |
104 | testdpkginstalled a b c | |
105 | testfileequal 'rootdir/var/lib/apt/extended_states' '' |