]> git.saurik.com Git - apt.git/blame - test/integration/test-multiarch-allowed
test-apt-download-progress: Allow smaller progress change
[apt.git] / test / integration / test-multiarch-allowed
CommitLineData
ecc138f8
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
7configarchitecture 'amd64' 'i386'
8
9insertpackage 'unstable' 'foo' 'amd64,i386' '1' 'Multi-Arch: allowed'
10insertpackage 'unstable' 'needsfoo' 'amd64,i386' '1' 'Depends: foo'
11insertpackage 'unstable' 'needsfooany' 'amd64,i386' '1' 'Depends: foo:any'
12insertpackage 'unstable' 'needsfoover1' 'amd64,i386' '1' 'Depends: foo:any (>= 1)'
13insertpackage 'unstable' 'needsfoover2' 'amd64,i386' '1' 'Depends: foo:any (>= 2)'
14insertpackage 'unstable' 'hatesfoo' 'amd64' '1' 'Conflicts: foo'
3addaba1 15insertpackage 'unstable' 'hatesfooany' 'amd64' '1' 'Conflicts: foo:any' # this makes no senseā€¦?
ecc138f8
DK
16insertpackage 'unstable' 'hatesfoonative' 'amd64' '1' 'Conflicts: foo:amd64'
17
18insertpackage 'unstable' 'coolfoo' 'amd64' '1' 'Multi-Arch:allowed
19Provides: coolbar'
20insertpackage 'unstable' 'coolfoover' 'amd64' '1' 'Multi-Arch:allowed
21Provides: coolbar (= 2)'
22insertpackage 'unstable' 'needscoolfoo' 'amd64' '1' 'Depends: coolfoo, coolbar'
23insertpackage 'unstable' 'needscoolfooany' 'amd64' '1' 'Depends: coolfoo:any, coolbar:any'
3addaba1
DK
24insertpackage 'unstable' 'needscoolfoover0' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar:any'
25insertpackage 'unstable' 'needscoolfoover1' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar:any (>= 1)'
26insertpackage 'unstable' 'needscoolfoover2' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar:any (>= 1)'
27insertpackage 'unstable' 'needscoolfoover3' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar:any (>= 3)'
ecc138f8
DK
28
29setupaptarchive
30
31BADPREFIX='Reading package lists...
32Building dependency tree...
33Some packages could not be installed. This may mean that you have
34requested an impossible situation or if you are using the unstable
35distribution that some required packages have not yet been created
36or been moved out of Incoming.
37The following information may help to resolve the situation:
38'
39
40solveableinsinglearch0() {
41 testsuccessequal 'Reading package lists...
42Building dependency tree...
e7ebb414 43The following additional packages will be installed:
ecc138f8
DK
44 foo
45The following NEW packages will be installed:
46 foo needsfoo
470 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
48Inst foo (1 unstable [amd64])
49Inst needsfoo (1 unstable [amd64])
50Conf foo (1 unstable [amd64])
51Conf needsfoo (1 unstable [amd64])' aptget install needsfoo -s
52}
53solveableinsinglearch0
54testsuccessequal 'Reading package lists...
55Building dependency tree...
e7ebb414 56The following additional packages will be installed:
ecc138f8
DK
57 foo:i386
58The following NEW packages will be installed:
59 foo:i386 needsfoo:i386
600 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
61Inst foo:i386 (1 unstable [i386])
62Inst needsfoo:i386 (1 unstable [i386])
63Conf foo:i386 (1 unstable [i386])
64Conf needsfoo:i386 (1 unstable [i386])' aptget install needsfoo:i386 -s
65testfailureequal "$BADPREFIX
66The following packages have unmet dependencies:
67 needsfoo:i386 : Depends: foo:i386 but it is not going to be installed
68E: Unable to correct problems, you have held broken packages." aptget install needsfoo:i386 foo:amd64 -s
69testfailureequal "$BADPREFIX
70The following packages have unmet dependencies:
71 needsfoo : Depends: foo but it is not going to be installed
72E: Unable to correct problems, you have held broken packages." aptget install needsfoo foo:i386 -s
73
74solveableinsinglearch1() {
75 testsuccessequal "Reading package lists...
76Building dependency tree...
e7ebb414 77The following additional packages will be installed:
ecc138f8
DK
78 foo
79The following NEW packages will be installed:
80 foo $1
810 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
82Inst foo (1 unstable [amd64])
83Inst $1 (1 unstable [amd64])
84Conf foo (1 unstable [amd64])
85Conf $1 (1 unstable [amd64])" aptget install $1 -s
86}
87
88testneedsfooallgood() {
89 solveableinsinglearch1 $1
90 testsuccessequal "Reading package lists...
91Building dependency tree...
e7ebb414 92The following additional packages will be installed:
ecc138f8
DK
93 foo
94The following NEW packages will be installed:
95 foo $1:i386
960 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
97Inst foo (1 unstable [amd64])
98Inst $1:i386 (1 unstable [i386])
99Conf foo (1 unstable [amd64])
100Conf $1:i386 (1 unstable [i386])" aptget install $1:i386 -s
101 testsuccessequal "Reading package lists...
102Building dependency tree...
103The following NEW packages will be installed:
104 foo:i386 $1:i386
1050 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
106Inst foo:i386 (1 unstable [i386])
107Inst $1:i386 (1 unstable [i386])
108Conf foo:i386 (1 unstable [i386])
109Conf $1:i386 (1 unstable [i386])" aptget install $1:i386 foo:i386 -s
110 testsuccessequal "Reading package lists...
111Building dependency tree...
112The following NEW packages will be installed:
113 foo:i386 $1
1140 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
115Inst foo:i386 (1 unstable [i386])
116Inst $1 (1 unstable [amd64])
117Conf foo:i386 (1 unstable [i386])
118Conf $1 (1 unstable [amd64])" aptget install $1 foo:i386 -s
119}
120testneedsfooallgood 'needsfooany'
121testneedsfooallgood 'needsfoover1'
122
123NEEDSFOO2NATIVE="$BADPREFIX
124The following packages have unmet dependencies:
125 needsfoover2 : Depends: foo:any (>= 2)
126E: Unable to correct problems, you have held broken packages."
127NEEDSFOO2FOREIGN="$BADPREFIX
128The following packages have unmet dependencies:
f6ce7ffc 129 needsfoover2:i386 : Depends: foo:any (>= 2)
ecc138f8
DK
130E: Unable to correct problems, you have held broken packages."
131testfailureequal "$NEEDSFOO2NATIVE" aptget install needsfoover2 -s
132testfailureequal "$NEEDSFOO2FOREIGN" aptget install needsfoover2:i386 -s
133testfailureequal "$NEEDSFOO2FOREIGN" aptget install needsfoover2:i386 foo:i386 -s
134testfailureequal "$NEEDSFOO2NATIVE" aptget install needsfoover2 foo:i386 -s
135
136solveableinsinglearch2() {
137 testfailureequal "$BADPREFIX
138The following packages have unmet dependencies:
139 hatesfoo : Conflicts: foo but 1 is to be installed
140E: Unable to correct problems, you have held broken packages." aptget install foo hatesfoo -s
bb0f6a34
DK
141 # the message differs slightly between single and multiarch
142 testfailuremsg 'E: Unable to correct problems, you have held broken packages.' aptget install foo hatesfooany -s
ecc138f8
DK
143 testfailureequal "$BADPREFIX
144The following packages have unmet dependencies:
3addaba1 145 hatesfoonative : Conflicts: foo:amd64
ecc138f8
DK
146E: Unable to correct problems, you have held broken packages." aptget install foo hatesfoonative -s
147}
148solveableinsinglearch2
149testfailureequal "$BADPREFIX
150The following packages have unmet dependencies:
151 hatesfoo : Conflicts: foo:i386 but 1 is to be installed
152E: Unable to correct problems, you have held broken packages." aptget install foo:i386 hatesfoo -s
153testfailureequal "$BADPREFIX
154The following packages have unmet dependencies:
155 hatesfooany : Conflicts: foo:any
156E: Unable to correct problems, you have held broken packages." aptget install foo:i386 hatesfooany -s
157testsuccessequal 'Reading package lists...
158Building dependency tree...
159The following NEW packages will be installed:
160 foo:i386 hatesfoonative
1610 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
162Inst foo:i386 (1 unstable [i386])
163Inst hatesfoonative (1 unstable [amd64])
164Conf foo:i386 (1 unstable [i386])
165Conf hatesfoonative (1 unstable [amd64])' aptget install foo:i386 hatesfoonative -s
166
167solveableinsinglearch3() {
168 testsuccessequal "Reading package lists...
169Building dependency tree...
e7ebb414 170The following additional packages will be installed:
ecc138f8
DK
171 coolfoo
172The following NEW packages will be installed:
173 coolfoo needscoolfoo
1740 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
175Inst coolfoo (1 unstable [amd64])
176Inst needscoolfoo (1 unstable [amd64])
177Conf coolfoo (1 unstable [amd64])
178Conf needscoolfoo (1 unstable [amd64])" aptget install needscoolfoo -s
179 testsuccessequal "Reading package lists...
180Building dependency tree...
e7ebb414 181The following additional packages will be installed:
ecc138f8
DK
182 coolfoo
183The following NEW packages will be installed:
184 coolfoo coolfoover needscoolfoo
1850 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
186Inst coolfoo (1 unstable [amd64])
187Inst coolfoover (1 unstable [amd64])
188Inst needscoolfoo (1 unstable [amd64])
189Conf coolfoo (1 unstable [amd64])
190Conf coolfoover (1 unstable [amd64])
191Conf needscoolfoo (1 unstable [amd64])" aptget install needscoolfoo coolfoover -s
3addaba1
DK
192 testsuccessequal "Reading package lists...
193Building dependency tree...
194The following additional packages will be installed:
195 coolfoo
196The following NEW packages will be installed:
197 coolfoo needscoolfooany
1980 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
199Inst coolfoo (1 unstable [amd64])
200Inst needscoolfooany (1 unstable [amd64])
201Conf coolfoo (1 unstable [amd64])
202Conf needscoolfooany (1 unstable [amd64])" aptget install needscoolfooany -s
ecc138f8
DK
203 testsuccessequal 'Reading package lists...
204Building dependency tree...
e7ebb414 205The following additional packages will be installed:
ecc138f8
DK
206 coolfoo
207The following NEW packages will be installed:
208 coolfoo needscoolfoover0
2090 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
210Inst coolfoo (1 unstable [amd64])
211Inst needscoolfoover0 (1 unstable [amd64])
212Conf coolfoo (1 unstable [amd64])
213Conf needscoolfoover0 (1 unstable [amd64])' aptget install needscoolfoover0 -s
214 testsuccessequal 'Reading package lists...
215Building dependency tree...
e7ebb414 216The following additional packages will be installed:
ecc138f8
DK
217 coolfoo coolfoover
218The following NEW packages will be installed:
219 coolfoo coolfoover needscoolfoover1
2200 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
221Inst coolfoo (1 unstable [amd64])
222Inst coolfoover (1 unstable [amd64])
223Inst needscoolfoover1 (1 unstable [amd64])
224Conf coolfoo (1 unstable [amd64])
225Conf coolfoover (1 unstable [amd64])
226Conf needscoolfoover1 (1 unstable [amd64])' aptget install needscoolfoover1 -s
227 testfailureequal "$BADPREFIX
228The following packages have unmet dependencies:
229 needscoolfoover2 : Depends: coolfoo:any (>= 2)
230E: Unable to correct problems, you have held broken packages." aptget install needscoolfoover2 -s
231 testfailureequal "$BADPREFIX
232The following packages have unmet dependencies:
233 needscoolfoover3 : Depends: coolfoo:any (>= 2)
3addaba1 234 Depends: coolbar:any (>= 3)
ecc138f8
DK
235E: Unable to correct problems, you have held broken packages." aptget install needscoolfoover3 -s
236}
237solveableinsinglearch3
238
239msgmsg 'switch to single architecture'
240configarchitecture 'amd64'
241
242solveableinsinglearch0
243testfailureequal 'Reading package lists...
244Building dependency tree...
3addaba1 245E: Unable to locate package needsfoo:i386' aptget install needsfoo:i386 -s
ecc138f8
DK
246
247solveableinsinglearch1 'needsfooany'
248solveableinsinglearch1 'needsfoover1'
249testfailureequal "$NEEDSFOO2NATIVE" aptget install needsfoover2 -s
250solveableinsinglearch2
251solveableinsinglearch3
384f17b4
DK
252
253msgmsg 'multi-arch with barbarian archs'
254configarchitecture 'amd64' 'i386'
255insertinstalledpackage 'foo' 'armel' '1' 'Multi-Arch: allowed'
256insertinstalledpackage 'coolfoo' 'armel' '1' 'Multi-Arch:allowed
257Provides: coolbar'
258
259testsuccessequal 'Reading package lists...
260Building dependency tree...
261The following additional packages will be installed:
262 foo
263The following packages will be REMOVED:
264 foo:armel
265The following NEW packages will be installed:
266 foo needsfooany
2670 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
268Remv foo:armel [1]
269Inst foo (1 unstable [amd64])
270Inst needsfooany (1 unstable [amd64])
271Conf foo (1 unstable [amd64])
272Conf needsfooany (1 unstable [amd64])' aptget install needsfooany -s
273testsuccessequal 'Reading package lists...
274Building dependency tree...
275The following additional packages will be installed:
276 foo
277The following packages will be REMOVED:
278 foo:armel
279The following NEW packages will be installed:
280 foo needsfooany:i386
2810 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
282Remv foo:armel [1]
283Inst foo (1 unstable [amd64])
284Inst needsfooany:i386 (1 unstable [i386])
285Conf foo (1 unstable [amd64])
286Conf needsfooany:i386 (1 unstable [i386])' aptget install needsfooany:i386 -s
287testsuccessequal 'Reading package lists...
288Building dependency tree...
289The following additional packages will be installed:
290 coolfoo
291The following packages will be REMOVED:
292 coolfoo:armel
293The following NEW packages will be installed:
294 coolfoo needscoolfoover0
2950 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
296Remv coolfoo:armel [1]
297Inst coolfoo (1 unstable [amd64])
298Inst needscoolfoover0 (1 unstable [amd64])
299Conf coolfoo (1 unstable [amd64])
300Conf needscoolfoover0 (1 unstable [amd64])' aptget install needscoolfoover0 -s