]> git.saurik.com Git - apt.git/blame - test/integration/test-multiarch-foreign
test-apt-download-progress: Use a larger file for testing
[apt.git] / test / integration / test-multiarch-foreign
CommitLineData
2b5c35c7
DK
1#!/bin/sh
2set -e
3
3abb6a6a
DK
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
2b5c35c7
DK
6setupenvironment
7configarchitecture 'amd64' 'i386' 'armel'
8
9insertpackage 'unstable' 'cool-foo' 'amd64,i386' '1.0' 'Depends: foo'
596ec43c
DK
10insertpackage 'unstable' 'cool-foo-x64' 'amd64' '1.0' 'Depends: foo:amd64'
11insertpackage 'unstable' 'cool-foo-x32' 'amd64' '1.0' 'Depends: foo:i386'
ecc138f8
DK
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'
2b5c35c7
DK
15insertpackage 'unstable' 'foo' 'amd64,i386,armel' '1.0' 'Multi-Arch: foreign'
16
17insertpackage 'unstable' 'cool-bar' 'amd64,i386' '1.0' 'Depends: bar-provider'
596ec43c
DK
18insertpackage 'unstable' 'cool-bar-x64' 'amd64' '1.0' 'Depends: bar-provider:amd64'
19insertpackage 'unstable' 'cool-bar-x32' 'amd64' '1.0' 'Depends: bar-provider:i386'
ecc138f8
DK
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'
2b5c35c7
DK
23insertpackage 'unstable' 'bar' 'amd64,i386,armel' '1.0' 'Provides: bar-provider
24Multi-Arch: foreign'
25
26setupaptarchive
27
25b86db1 28testsuccessequal 'Reading package lists...
2b5c35c7 29Building dependency tree...
e7ebb414 30The following additional packages will be installed:
2b5c35c7
DK
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
25b86db1 40testsuccessequal 'Reading package lists...
2b5c35c7
DK
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
25b86db1 50testsuccessequal 'Reading package lists...
2b5c35c7
DK
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
25b86db1 60testsuccessequal 'Reading package lists...
2b5c35c7 61Building dependency tree...
e7ebb414 62The following additional packages will be installed:
2b5c35c7
DK
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
25b86db1 72testsuccessequal 'Reading package lists...
2b5c35c7 73Building dependency tree...
596ec43c
DK
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
05f64ca2 82testsuccessequal 'Reading package lists...
596ec43c
DK
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
05f64ca2 92testsuccessequal "Reading package lists...
596ec43c
DK
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])
87d6947d 101Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider:i386 -s
596ec43c
DK
102
103satisfiable_in_singlearch() {
05f64ca2 104 testsuccessequal 'Reading package lists...
596ec43c 105Building dependency tree...
e7ebb414 106The following additional packages will be installed:
596ec43c
DK
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
05f64ca2 116 testsuccessequal 'Reading package lists...
596ec43c
DK
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
05f64ca2 126 testsuccessequal 'Reading package lists...
596ec43c 127Building dependency tree...
e7ebb414 128The following additional packages will be installed:
2b5c35c7
DK
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
05f64ca2 138 testsuccessequal 'Reading package lists...
2b5c35c7
DK
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
05f64ca2 148 testsuccessequal "Reading package lists...
2b5c35c7 149Building dependency tree...
596ec43c 150Note, selecting 'bar' instead of 'bar-provider'
2b5c35c7 151The following NEW packages will be installed:
596ec43c 152 bar cool-bar
2b5c35c7 1530 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
596ec43c 154Inst bar (1.0 unstable [amd64])
2b5c35c7 155Inst cool-bar (1.0 unstable [amd64])
596ec43c 156Conf bar (1.0 unstable [amd64])
87d6947d 157Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider -s
2b5c35c7 158
05f64ca2 159 testsuccessequal 'Reading package lists...
2b5c35c7 160Building dependency tree...
e7ebb414 161The following additional packages will be installed:
596ec43c 162 foo
2b5c35c7 163The following NEW packages will be installed:
596ec43c 164 cool-foo-x64 foo
2b5c35c7 1650 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
596ec43c
DK
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}
286afa36 171
ecc138f8
DK
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:
3addaba1
DK
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
ecc138f8 200}
3addaba1
DK
201hatersgonnahate 'foo' 'hates-foo-x64' 'hates-foo-x32' 'amd64'
202hatersgonnahate 'foo:i386' 'hates-foo-x32' 'hates-foo-x64' 'i386'
ecc138f8 203
05f64ca2 204 testsuccessequal 'Reading package lists...
286afa36 205Building dependency tree...
e7ebb414 206The following additional packages will be installed:
3addaba1 207 foo:i386
286afa36 208The following NEW packages will be installed:
3addaba1 209 cool-foo-x32 foo:i386
596ec43c 2100 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
3addaba1 211Inst foo:i386 (1.0 unstable [i386])
596ec43c 212Inst cool-foo-x32 (1.0 unstable [amd64])
3addaba1 213Conf foo:i386 (1.0 unstable [i386])
596ec43c
DK
214Conf cool-foo-x32 (1.0 unstable [amd64])' aptget install cool-foo-x32 -s
215
05f64ca2 216 testsuccessequal 'Reading package lists...
596ec43c 217Building dependency tree...
e7ebb414 218The following additional packages will be installed:
3addaba1 219 bar:i386
596ec43c 220The following NEW packages will be installed:
3addaba1 221 bar:i386 cool-bar-x32
286afa36 2220 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
3addaba1 223Inst bar:i386 (1.0 unstable [i386])
596ec43c 224Inst cool-bar-x32 (1.0 unstable [amd64])
3addaba1 225Conf bar:i386 (1.0 unstable [i386])
87d6947d 226Conf cool-bar-x32 (1.0 unstable [amd64])' aptget install cool-bar-x32 -s
286afa36 227
05f64ca2 228 testsuccessequal 'Reading package lists...
286afa36 229Building dependency tree...
e7ebb414 230The following additional packages will be installed:
596ec43c 231 bar
286afa36 232The following NEW packages will be installed:
596ec43c 233 bar cool-bar-x64
286afa36 2340 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
596ec43c
DK
235Inst bar (1.0 unstable [amd64])
236Inst cool-bar-x64 (1.0 unstable [amd64])
237Conf bar (1.0 unstable [amd64])
87d6947d 238Conf cool-bar-x64 (1.0 unstable [amd64])' aptget install cool-bar-x64 -s
596ec43c
DK
239
240
241satisfiable_in_singlearch
242
243msgmsg 'switch to single architecture'
244configarchitecture 'amd64'
245
246satisfiable_in_singlearch
384f17b4
DK
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'
62428dbc 253insertinstalledpackage 'bar-needer' 'armhf' '1.0' 'Depends: bar-provider'
384f17b4 254
62428dbc 255testsuccess aptget check
384f17b4
DK
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.
62428dbc 279Remv bar:armhf [1.0] [bar-needer:armhf ]
384f17b4
DK
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
62428dbc
DK
284
285# a barbarian doesn't satisfy another either
286insertinstalledpackage 'bar-needer2' 's390x' '1.0' 'Depends: bar-provider'
287testfailure aptget check