]>
Commit | Line | Data |
---|---|---|
40faab46 DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | # dpkg implements versioned provides in commit 5bb02fe80e9f40dcad9703a72f67cf615ff217b5 | |
5 | # but previous versions seem to allow parsing, working and ignoring it. | |
6 | ||
7 | TESTDIR=$(readlink -f $(dirname $0)) | |
8 | . $TESTDIR/framework | |
9 | setupenvironment | |
10 | configarchitecture 'amd64' 'i386' | |
11 | ||
12 | insertinstalledpackage 'webapp' 'all' '1' 'Depends: httpd' | |
13 | insertinstalledpackage 'webserver' 'all' '1' 'Provides: httpd' | |
14 | ||
15 | insertpackage 'unstable' 'webapp' 'all' '2' 'Depends: httpd (>= 2)' | |
16 | insertpackage 'unstable' 'webserver' 'amd64' '2' 'Provides: httpd (= 2)' | |
17 | insertpackage 'unstable' 'foreign-webserver' 'i386' '2' 'Multi-Arch: foreign | |
18 | Provides: httpd (= 2)' | |
19 | ||
20 | insertpackage 'experimental' 'webapp' 'all' '3' 'Depends: httpd (>= 1.5)' | |
21 | insertpackage 'experimental' 'webserver' 'amd64' '3' 'Provides: httpd (= 3)' | |
22 | ||
23 | insertpackage 'experimental' 'foreign-webserver' 'i386' '4' 'Multi-Arch: foreign | |
24 | Provides: httpd (= 4)' | |
25 | insertpackage 'experimental' 'cool-webapp' 'all' '4' 'Depends: httpd (>= 4)' | |
26 | ||
25b86db1 DK |
27 | # arch-qualified provides, see #777071 |
28 | insertpackage 'unstable' 'foo' 'all' '1' 'Provides: bar:i386' | |
29 | insertpackage 'unstable' 'baz' 'i386,amd64' '1' 'Depends: bar' | |
30 | insertpackage 'experimental' 'baz' 'i386,amd64' '2' 'Depends: bar:i386' | |
31 | insertpackage 'experimental' 'baz-broken' 'i386' '2' 'Depends: bar:amd64' | |
32 | ||
ecc138f8 DK |
33 | insertpackage 'unstable' 'next' 'amd64' '1' 'Multi-Arch: foreign |
34 | Provides: next (= 2)' | |
35 | insertpackage 'unstable' 'needsrealnext' 'amd64,i386' '2' 'Depends: next (>= 2)' | |
36 | ||
37 | insertpackage 'unstable' 'virtualnext2' 'amd64' '1' 'Multi-Arch: foreign | |
38 | Provides: next2 (= 2)' | |
39 | insertpackage 'unstable' 'needsnext2' 'amd64,i386' '2' 'Depends: next2 (>= 2)' | |
40 | ||
41 | insertpackage 'unstable' 'virtualnext3' 'amd64' '1' 'Multi-Arch: no | |
42 | Provides: next3 (= 2)' | |
43 | insertpackage 'unstable' 'needsnext3' 'amd64,i386' '2' 'Depends: next3 (>= 2)' | |
44 | ||
40faab46 DK |
45 | setupaptarchive |
46 | ||
25b86db1 | 47 | testsuccessequal 'Reading package lists... |
40faab46 | 48 | Building dependency tree... |
2a884c61 | 49 | Calculating upgrade... |
40faab46 DK |
50 | The following packages will be upgraded: |
51 | webapp webserver | |
52 | 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | |
53 | Inst webserver [1] (2 unstable [amd64]) | |
54 | Inst webapp [1] (2 unstable [all]) | |
55 | Conf webserver (2 unstable [amd64]) | |
56 | Conf webapp (2 unstable [all])' aptget dist-upgrade -s | |
57 | ||
25b86db1 | 58 | testsuccessequal 'Reading package lists... |
40faab46 DK |
59 | Building dependency tree... |
60 | The following packages will be upgraded: | |
61 | webapp webserver | |
62 | 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | |
63 | Inst webserver [1] (2 unstable [amd64]) | |
64 | Inst webapp [1] (2 unstable [all]) | |
65 | Conf webserver (2 unstable [amd64]) | |
66 | Conf webapp (2 unstable [all])' aptget install webapp webserver -s | |
67 | ||
25b86db1 | 68 | testsuccessequal 'Reading package lists... |
40faab46 DK |
69 | Building dependency tree... |
70 | The following packages will be upgraded: | |
71 | webapp webserver | |
72 | 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | |
73 | Inst webserver [1] (2 unstable [amd64]) | |
74 | Inst webapp [1] (3 experimental [all]) | |
75 | Conf webserver (2 unstable [amd64]) | |
76 | Conf webapp (3 experimental [all])' aptget install webapp=3 webserver -s | |
77 | ||
25b86db1 | 78 | testsuccessequal 'Reading package lists... |
40faab46 DK |
79 | Building dependency tree... |
80 | The following packages will be upgraded: | |
81 | webapp webserver | |
82 | 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | |
83 | Inst webserver [1] (3 experimental [amd64]) | |
84 | Inst webapp [1] (2 unstable [all]) | |
85 | Conf webserver (3 experimental [amd64]) | |
86 | Conf webapp (2 unstable [all])' aptget install webapp webserver=3 -s | |
87 | ||
25b86db1 | 88 | testsuccessequal 'Reading package lists... |
40faab46 DK |
89 | Building dependency tree... |
90 | The following NEW packages will be installed: | |
91 | foreign-webserver:i386 | |
92 | The following packages will be upgraded: | |
93 | webapp | |
94 | 1 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. | |
95 | Inst foreign-webserver:i386 (2 unstable [i386]) | |
96 | Inst webapp [1] (2 unstable [all]) | |
97 | Conf foreign-webserver:i386 (2 unstable [i386]) | |
98 | Conf webapp (2 unstable [all])' aptget install webapp foreign-webserver:i386 -s | |
99 | ||
25b86db1 | 100 | testsuccessequal 'Reading package lists... |
40faab46 DK |
101 | Building dependency tree... |
102 | The following NEW packages will be installed: | |
103 | foreign-webserver:i386 | |
104 | The following packages will be upgraded: | |
105 | webapp | |
106 | 1 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. | |
107 | Inst foreign-webserver:i386 (2 unstable [i386]) | |
108 | Inst webapp [1] (3 experimental [all]) | |
109 | Conf foreign-webserver:i386 (2 unstable [i386]) | |
110 | Conf webapp (3 experimental [all])' aptget install webapp=3 foreign-webserver:i386 -s | |
111 | ||
25b86db1 | 112 | testsuccessequal 'Reading package lists... |
40faab46 DK |
113 | Building dependency tree... |
114 | The following NEW packages will be installed: | |
115 | foreign-webserver:i386 | |
116 | The following packages will be upgraded: | |
117 | webapp | |
118 | 1 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. | |
119 | Inst foreign-webserver:i386 (4 experimental [i386]) | |
120 | Inst webapp [1] (2 unstable [all]) | |
121 | Conf foreign-webserver:i386 (4 experimental [i386]) | |
122 | Conf webapp (2 unstable [all])' aptget install webapp foreign-webserver:i386=4 -s | |
123 | ||
25b86db1 | 124 | testfailureequal 'Reading package lists... |
40faab46 DK |
125 | Building dependency tree... |
126 | Some packages could not be installed. This may mean that you have | |
127 | requested an impossible situation or if you are using the unstable | |
128 | distribution that some required packages have not yet been created | |
129 | or been moved out of Incoming. | |
130 | The following information may help to resolve the situation: | |
131 | ||
132 | The following packages have unmet dependencies: | |
133 | cool-webapp : Depends: httpd (>= 4) | |
134 | E: Unable to correct problems, you have held broken packages.' aptget install cool-webapp -s | |
135 | ||
25b86db1 | 136 | testfailureequal 'Reading package lists... |
40faab46 DK |
137 | Building dependency tree... |
138 | Some packages could not be installed. This may mean that you have | |
139 | requested an impossible situation or if you are using the unstable | |
140 | distribution that some required packages have not yet been created | |
141 | or been moved out of Incoming. | |
142 | The following information may help to resolve the situation: | |
143 | ||
144 | The following packages have unmet dependencies: | |
145 | cool-webapp : Depends: httpd (>= 4) | |
146 | E: Unable to correct problems, you have held broken packages.' aptget install cool-webapp foreign-webserver:i386 -s | |
147 | ||
25b86db1 | 148 | testsuccessequal 'Reading package lists... |
40faab46 DK |
149 | Building dependency tree... |
150 | The following NEW packages will be installed: | |
151 | cool-webapp foreign-webserver:i386 | |
152 | 0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. | |
153 | Inst foreign-webserver:i386 (4 experimental [i386]) | |
154 | Inst cool-webapp (4 experimental [all]) | |
155 | Conf foreign-webserver:i386 (4 experimental [i386]) | |
156 | Conf cool-webapp (4 experimental [all])' aptget install cool-webapp foreign-webserver:i386=4 -s | |
25b86db1 DK |
157 | |
158 | testsuccessequal 'Reading package lists... | |
159 | Building dependency tree... | |
e7ebb414 | 160 | The following additional packages will be installed: |
25b86db1 DK |
161 | foo |
162 | The following NEW packages will be installed: | |
163 | baz:i386 foo | |
164 | 0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. | |
165 | Inst foo (1 unstable [all]) | |
166 | Inst baz:i386 (1 unstable [i386]) | |
167 | Conf foo (1 unstable [all]) | |
168 | Conf baz:i386 (1 unstable [i386])' aptget install baz:i386 -s | |
169 | ||
170 | testfailureequal 'Reading package lists... | |
171 | Building dependency tree... | |
172 | Some packages could not be installed. This may mean that you have | |
173 | requested an impossible situation or if you are using the unstable | |
174 | distribution that some required packages have not yet been created | |
175 | or been moved out of Incoming. | |
176 | The following information may help to resolve the situation: | |
177 | ||
178 | The following packages have unmet dependencies: | |
179 | baz : Depends: bar but it is not installable | |
180 | E: Unable to correct problems, you have held broken packages.' aptget install baz:amd64 -s | |
181 | ||
182 | testsuccessequal "Reading package lists... | |
183 | Building dependency tree... | |
184 | Selected version '2' (experimental [amd64]) for 'baz' | |
e7ebb414 | 185 | The following additional packages will be installed: |
25b86db1 DK |
186 | foo |
187 | The following NEW packages will be installed: | |
188 | baz foo | |
189 | 0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. | |
190 | Inst foo (1 unstable [all]) | |
191 | Inst baz (2 experimental [amd64]) | |
192 | Conf foo (1 unstable [all]) | |
193 | Conf baz (2 experimental [amd64])" aptget install baz/experimental -s -q=0 | |
194 | ||
195 | testsuccessequal "Reading package lists... | |
196 | Building dependency tree... | |
197 | Selected version '2' (experimental [i386]) for 'baz:i386' | |
e7ebb414 | 198 | The following additional packages will be installed: |
25b86db1 DK |
199 | foo |
200 | The following NEW packages will be installed: | |
201 | baz:i386 foo | |
202 | 0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. | |
203 | Inst foo (1 unstable [all]) | |
204 | Inst baz:i386 (2 experimental [i386]) | |
205 | Conf foo (1 unstable [all]) | |
206 | Conf baz:i386 (2 experimental [i386])" aptget install baz:i386/experimental -s -q=0 | |
207 | ||
208 | testfailureequal 'Reading package lists... | |
209 | Building dependency tree... | |
210 | Some packages could not be installed. This may mean that you have | |
211 | requested an impossible situation or if you are using the unstable | |
212 | distribution that some required packages have not yet been created | |
213 | or been moved out of Incoming. | |
214 | The following information may help to resolve the situation: | |
215 | ||
216 | The following packages have unmet dependencies: | |
217 | baz-broken:i386 : Depends: bar but it is not installable | |
218 | E: Unable to correct problems, you have held broken packages.' aptget install baz-broken -s | |
ecc138f8 DK |
219 | |
220 | testsuccessequal 'Reading package lists... | |
221 | Building dependency tree... | |
e7ebb414 | 222 | The following additional packages will be installed: |
ecc138f8 DK |
223 | next |
224 | The following NEW packages will be installed: | |
225 | needsrealnext next | |
226 | 0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. | |
227 | Inst next (1 unstable [amd64]) | |
228 | Inst needsrealnext (2 unstable [amd64]) | |
229 | Conf next (1 unstable [amd64]) | |
230 | Conf needsrealnext (2 unstable [amd64])' aptget install needsrealnext -s | |
231 | ||
232 | testsuccessequal 'Reading package lists... | |
233 | Building dependency tree... | |
e7ebb414 | 234 | The following additional packages will be installed: |
ecc138f8 DK |
235 | next |
236 | The following NEW packages will be installed: | |
237 | needsrealnext:i386 next | |
238 | 0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. | |
239 | Inst next (1 unstable [amd64]) | |
240 | Inst needsrealnext:i386 (2 unstable [i386]) | |
241 | Conf next (1 unstable [amd64]) | |
242 | Conf needsrealnext:i386 (2 unstable [i386])' aptget install needsrealnext:i386 -s | |
243 | ||
244 | testsuccessequal 'Reading package lists... | |
245 | Building dependency tree... | |
e7ebb414 | 246 | The following additional packages will be installed: |
ecc138f8 DK |
247 | virtualnext2 |
248 | The following NEW packages will be installed: | |
249 | needsnext2 virtualnext2 | |
250 | 0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. | |
251 | Inst virtualnext2 (1 unstable [amd64]) | |
252 | Inst needsnext2 (2 unstable [amd64]) | |
253 | Conf virtualnext2 (1 unstable [amd64]) | |
254 | Conf needsnext2 (2 unstable [amd64])' aptget install needsnext2 -s | |
255 | ||
256 | testsuccessequal 'Reading package lists... | |
257 | Building dependency tree... | |
e7ebb414 | 258 | The following additional packages will be installed: |
ecc138f8 DK |
259 | virtualnext2 |
260 | The following NEW packages will be installed: | |
261 | needsnext2:i386 virtualnext2 | |
262 | 0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. | |
263 | Inst virtualnext2 (1 unstable [amd64]) | |
264 | Inst needsnext2:i386 (2 unstable [i386]) | |
265 | Conf virtualnext2 (1 unstable [amd64]) | |
266 | Conf needsnext2:i386 (2 unstable [i386])' aptget install needsnext2:i386 -s | |
267 | ||
268 | testsuccessequal 'Reading package lists... | |
269 | Building dependency tree... | |
e7ebb414 | 270 | The following additional packages will be installed: |
ecc138f8 DK |
271 | virtualnext3 |
272 | The following NEW packages will be installed: | |
273 | needsnext3 virtualnext3 | |
274 | 0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. | |
275 | Inst virtualnext3 (1 unstable [amd64]) | |
276 | Inst needsnext3 (2 unstable [amd64]) | |
277 | Conf virtualnext3 (1 unstable [amd64]) | |
278 | Conf needsnext3 (2 unstable [amd64])' aptget install needsnext3 -s | |
279 | ||
280 | testfailureequal 'Reading package lists... | |
281 | Building dependency tree... | |
282 | Some packages could not be installed. This may mean that you have | |
283 | requested an impossible situation or if you are using the unstable | |
284 | distribution that some required packages have not yet been created | |
285 | or been moved out of Incoming. | |
286 | The following information may help to resolve the situation: | |
287 | ||
288 | The following packages have unmet dependencies: | |
289 | needsnext3:i386 : Depends: next3:i386 (>= 2) but it is not installable | |
290 | E: Unable to correct problems, you have held broken packages.' aptget install needsnext3:i386 -s |