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