]>
Commit | Line | Data |
---|---|---|
6a910c9d DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | setupenvironment | |
ea65d079 | 7 | configarchitecture 'i386' 'amd64' |
6a910c9d DK |
8 | |
9 | buildsimplenativepackage 'libc6' 'i386' '1.0' 'stable' | |
10 | buildsimplenativepackage 'libc6' 'amd64' '1.0' 'stable' | |
11 | buildsimplenativepackage 'libc6' 'all' '2.0' 'testing' | |
12 | ||
13 | buildsimplenativepackage 'foobar' 'i386' '1.0' 'stable' 'Depends: libc6' | |
14 | buildsimplenativepackage 'foobar' 'amd64' '1.0' 'stable' 'Depends: libc6' | |
15 | ||
16 | setupaptarchive | |
17 | ||
6a910c9d | 18 | aptget install libc6:i386 -t stable -y -qq 2>&1 > /dev/null |
53ea1b56 | 19 | testdpkginstalled libc6:i386 |
6a910c9d DK |
20 | testequal 'Reading package lists... |
21 | Building dependency tree... | |
22 | Reading state information... | |
23 | The following packages will be REMOVED: | |
24 | libc6 | |
25 | The following NEW packages will be installed: | |
26 | libc6:amd64 | |
27 | 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. | |
28 | Remv libc6 [1.0] | |
29 | Inst libc6:amd64 (1.0 stable [amd64]) | |
30 | Conf libc6:amd64 (1.0 stable [amd64])' aptget install libc6:amd64 -s -t stable | |
31 | ||
32 | testequal 'Reading package lists... | |
33 | Building dependency tree... | |
34 | Reading state information... | |
35 | The following NEW packages will be installed: | |
36 | foobar | |
37 | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
38 | Inst foobar (1.0 stable [i386]) | |
39 | Conf foobar (1.0 stable [i386])' aptget install foobar -st stable | |
40 | ||
41 | testequal 'Reading package lists... | |
42 | Building dependency tree... | |
43 | Reading state information... | |
44 | The following extra packages will be installed: | |
45 | libc6:amd64 | |
46 | The following packages will be REMOVED: | |
47 | libc6 | |
48 | The following NEW packages will be installed: | |
49 | foobar:amd64 libc6:amd64 | |
50 | 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. | |
51 | Remv libc6 [1.0] | |
52 | Inst libc6:amd64 (1.0 stable [amd64]) | |
53 | Inst foobar:amd64 (1.0 stable [amd64]) | |
54 | Conf libc6:amd64 (1.0 stable [amd64]) | |
55 | Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64 -st stable | |
56 | ||
6a910c9d DK |
57 | testequal 'Reading package lists... |
58 | Building dependency tree... | |
59 | Reading state information... | |
6a910c9d | 60 | The following NEW packages will be installed: |
28166356 DK |
61 | foobar |
62 | The following packages will be upgraded: | |
63 | libc6 | |
64 | 1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
ca238ede | 65 | Inst libc6 [1.0] (2.0 testing [all]) |
6a910c9d | 66 | Inst foobar (1.0 stable [i386]) |
ca238ede | 67 | Conf libc6 (2.0 testing [all]) |
6a910c9d DK |
68 | Conf foobar (1.0 stable [i386])' aptget install foobar/stable libc6 -st testing |
69 | ||
6a910c9d DK |
70 | testequal 'Reading package lists... |
71 | Building dependency tree... | |
72 | Reading state information... | |
28166356 | 73 | The following packages will be upgraded: |
6a910c9d | 74 | libc6 |
28166356 | 75 | 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
ca238ede DK |
76 | Inst libc6 [1.0] (2.0 testing [all]) |
77 | Conf libc6 (2.0 testing [all])' aptget upgrade -t testing -s | |
53ea1b56 DK |
78 | # FIXME: on amd64 systems this test wouldn't run with a real upgrade |
79 | # as APT (here i386) disagree about the native architecture, so | |
80 | # we fake it here: | |
81 | #aptget upgrade -y -qq 2>&1 > /dev/null | |
82 | aptget purge libc6 -y -qq 2>&1 >/dev/null | |
83 | aptget install libc6:i386 -y -qq 2>&1 >/dev/null | |
84 | testdpkginstalled libc6:all | |
6a910c9d DK |
85 | |
86 | testequal 'Reading package lists... | |
87 | Building dependency tree... | |
88 | Reading state information... | |
89 | The following NEW packages will be installed: | |
90 | foobar | |
91 | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
28166356 | 92 | Inst foobar (1.0 stable [i386]) |
6a910c9d DK |
93 | Conf foobar (1.0 stable [i386])' aptget install foobar/stable -st testing |
94 | ||
95 | testequal 'Reading package lists... | |
96 | Building dependency tree... | |
97 | Reading state information... | |
28166356 DK |
98 | The following extra packages will be installed: |
99 | libc6:amd64 | |
100 | The following packages will be REMOVED: | |
101 | libc6 | |
6a910c9d | 102 | The following NEW packages will be installed: |
28166356 DK |
103 | foobar:amd64 libc6:amd64 |
104 | 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. | |
105 | Remv libc6 [2.0] | |
106 | Inst libc6:amd64 (1.0 stable [amd64]) | |
6a910c9d | 107 | Inst foobar:amd64 (1.0 stable [amd64]) |
28166356 | 108 | Conf libc6:amd64 (1.0 stable [amd64]) |
6a910c9d DK |
109 | Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64/stable -st testing |
110 | ||
111 | ||
6a910c9d DK |
112 | testequal "Reading package lists... |
113 | Building dependency tree... | |
114 | Reading state information... | |
115 | Selected version '1.0' (stable [i386]) for 'libc6' | |
28166356 | 116 | The following packages will be DOWNGRADED: |
6a910c9d | 117 | libc6 |
28166356 DK |
118 | 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded. |
119 | Inst libc6 [2.0] (1.0 stable [i386]) | |
6a910c9d DK |
120 | Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s -q=0 |
121 | ||
122 | ||
123 | buildsimplenativepackage 'libc6-same' 'i386' '1.0' 'stable' 'Multi-Arch: same' | |
124 | buildsimplenativepackage 'libc6-same' 'amd64' '1.0' 'stable' 'Multi-Arch: same' | |
125 | buildsimplenativepackage 'libc6-same' 'all' '2.0' 'testing' | |
126 | ||
127 | buildsimplenativepackage 'foobar-same' 'i386' '1.0' 'stable' 'Depends: libc6-same' | |
128 | buildsimplenativepackage 'foobar-same' 'amd64' '1.0' 'stable' 'Depends: libc6-same' | |
129 | ||
130 | setupaptarchive | |
131 | ||
132 | aptget install libc6-same:i386 -t stable -y -qq 2>&1 > /dev/null | |
53ea1b56 | 133 | testdpkginstalled libc6-same:i386 |
6a910c9d DK |
134 | |
135 | testequal 'Reading package lists... | |
136 | Building dependency tree... | |
137 | Reading state information... | |
138 | The following NEW packages will be installed: | |
139 | foobar-same | |
140 | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
141 | Inst foobar-same (1.0 stable [i386]) | |
142 | Conf foobar-same (1.0 stable [i386])' aptget install foobar-same -st stable | |
143 | ||
144 | testequal 'Reading package lists... | |
145 | Building dependency tree... | |
146 | Reading state information... | |
147 | The following extra packages will be installed: | |
148 | libc6-same:amd64 | |
149 | The following NEW packages will be installed: | |
150 | foobar-same:amd64 libc6-same:amd64 | |
151 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
152 | Inst libc6-same:amd64 (1.0 stable [amd64]) | |
153 | Inst foobar-same:amd64 (1.0 stable [amd64]) | |
154 | Conf libc6-same:amd64 (1.0 stable [amd64]) | |
155 | Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64 -st stable | |
156 | ||
157 | testequal 'Reading package lists... | |
158 | Building dependency tree... | |
159 | Reading state information... | |
160 | The following NEW packages will be installed: | |
161 | libc6-same:amd64 | |
162 | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
163 | Inst libc6-same:amd64 (1.0 stable [amd64]) | |
164 | Conf libc6-same:amd64 (1.0 stable [amd64])' aptget install libc6-same:amd64 -s -t stable | |
165 | ||
166 | # FIXME: We should test installing libc6-same:amd64 here, but dpkg doesn't allow it currently | |
167 | ||
6a910c9d DK |
168 | testequal 'Reading package lists... |
169 | Building dependency tree... | |
170 | Reading state information... | |
28166356 | 171 | The following packages will be upgraded: |
6a910c9d | 172 | libc6-same |
28166356 | 173 | 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
ca238ede DK |
174 | Inst libc6-same [1.0] (2.0 testing [all]) |
175 | Conf libc6-same (2.0 testing [all])' aptget upgrade -t testing -s | |
53ea1b56 DK |
176 | # FIXME: on amd64 systems this test wouldn't run with a real upgrade |
177 | # as APT (here i386) disagree about the native architecture, so | |
178 | # we fake it here: | |
179 | #aptget upgrade -y -qq 2>&1 > /dev/null | |
180 | aptget purge libc6-same -y -qq 2>&1 >/dev/null | |
181 | aptget install libc6-same:i386 -y -qq 2>&1 >/dev/null | |
182 | testdpkginstalled libc6-same:all | |
183 | ||
6a910c9d | 184 | |
6a910c9d DK |
185 | testequal "Reading package lists... |
186 | Building dependency tree... | |
187 | Reading state information... | |
188 | Selected version '1.0' (stable [i386]) for 'libc6-same' | |
28166356 | 189 | The following packages will be DOWNGRADED: |
6a910c9d | 190 | libc6-same |
28166356 DK |
191 | 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded. |
192 | Inst libc6-same [2.0] (1.0 stable [i386]) | |
6a910c9d DK |
193 | Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s -q=0 |
194 | ||
195 | testequal 'Reading package lists... | |
196 | Building dependency tree... | |
197 | Reading state information... | |
198 | The following NEW packages will be installed: | |
199 | foobar-same | |
200 | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
28166356 | 201 | Inst foobar-same (1.0 stable [i386]) |
6a910c9d DK |
202 | Conf foobar-same (1.0 stable [i386])' aptget install foobar-same/stable -st testing |
203 | ||
204 | testequal 'Reading package lists... | |
205 | Building dependency tree... | |
206 | Reading state information... | |
28166356 DK |
207 | The following extra packages will be installed: |
208 | libc6-same:amd64 | |
209 | The following packages will be REMOVED: | |
210 | libc6-same | |
6a910c9d | 211 | The following NEW packages will be installed: |
28166356 DK |
212 | foobar-same:amd64 libc6-same:amd64 |
213 | 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. | |
214 | Remv libc6-same [2.0] | |
215 | Inst libc6-same:amd64 (1.0 stable [amd64]) | |
6a910c9d | 216 | Inst foobar-same:amd64 (1.0 stable [amd64]) |
28166356 | 217 | Conf libc6-same:amd64 (1.0 stable [amd64]) |
6a910c9d | 218 | Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64/stable -st testing |