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