]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-multiarch-allowed
just-in-time creation for (implicit) Provides
[apt.git] / test / integration / test-multiarch-allowed
... / ...
CommitLineData
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'
15insertpackage 'unstable' 'hatesfooany' 'amd64' '1' 'Conflicts: foo:any' # this makes no senseā€¦
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'
24insertpackage 'unstable' 'needscoolfoover0' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar'
25insertpackage 'unstable' 'needscoolfoover1' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar (>= 1)'
26insertpackage 'unstable' 'needscoolfoover2' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar (>= 1)'
27insertpackage 'unstable' 'needscoolfoover3' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar (>= 3)'
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...
43The following extra packages will be installed:
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...
56The following extra packages will be installed:
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...
77The following extra packages will be installed:
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...
92The following extra packages will be installed:
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:
129 needsfoover2:i386 : Depends: foo:any:i386 (>= 2)
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
141 testfailureequal "$BADPREFIX
142The following packages have unmet dependencies:
143 hatesfooany : Conflicts: foo:any
144E: Unable to correct problems, you have held broken packages." aptget install foo hatesfooany -s
145 testfailureequal "$BADPREFIX
146The following packages have unmet dependencies:
147 hatesfoonative : Conflicts: foo but 1 is to be installed
148E: Unable to correct problems, you have held broken packages." aptget install foo hatesfoonative -s
149}
150solveableinsinglearch2
151testfailureequal "$BADPREFIX
152The following packages have unmet dependencies:
153 hatesfoo : Conflicts: foo:i386 but 1 is to be installed
154E: Unable to correct problems, you have held broken packages." aptget install foo:i386 hatesfoo -s
155testfailureequal "$BADPREFIX
156The following packages have unmet dependencies:
157 hatesfooany : Conflicts: foo:any
158E: Unable to correct problems, you have held broken packages." aptget install foo:i386 hatesfooany -s
159testsuccessequal 'Reading package lists...
160Building dependency tree...
161The following NEW packages will be installed:
162 foo:i386 hatesfoonative
1630 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
164Inst foo:i386 (1 unstable [i386])
165Inst hatesfoonative (1 unstable [amd64])
166Conf foo:i386 (1 unstable [i386])
167Conf hatesfoonative (1 unstable [amd64])' aptget install foo:i386 hatesfoonative -s
168
169solveableinsinglearch3() {
170 testsuccessequal "Reading package lists...
171Building dependency tree...
172The following extra packages will be installed:
173 coolfoo
174The following NEW packages will be installed:
175 coolfoo needscoolfoo
1760 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
177Inst coolfoo (1 unstable [amd64])
178Inst needscoolfoo (1 unstable [amd64])
179Conf coolfoo (1 unstable [amd64])
180Conf needscoolfoo (1 unstable [amd64])" aptget install needscoolfoo -s
181 testsuccessequal "Reading package lists...
182Building dependency tree...
183The following extra packages will be installed:
184 coolfoo
185The following NEW packages will be installed:
186 coolfoo coolfoover needscoolfoo
1870 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
188Inst coolfoo (1 unstable [amd64])
189Inst coolfoover (1 unstable [amd64])
190Inst needscoolfoo (1 unstable [amd64])
191Conf coolfoo (1 unstable [amd64])
192Conf coolfoover (1 unstable [amd64])
193Conf needscoolfoo (1 unstable [amd64])" aptget install needscoolfoo coolfoover -s
194 testfailureequal "$BADPREFIX
195The following packages have unmet dependencies:
196 needscoolfooany : Depends: coolbar:any but it is not installable
197E: Unable to correct problems, you have held broken packages." aptget install needscoolfooany -s
198 testsuccessequal 'Reading package lists...
199Building dependency tree...
200The following extra packages will be installed:
201 coolfoo
202The following NEW packages will be installed:
203 coolfoo needscoolfoover0
2040 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
205Inst coolfoo (1 unstable [amd64])
206Inst needscoolfoover0 (1 unstable [amd64])
207Conf coolfoo (1 unstable [amd64])
208Conf needscoolfoover0 (1 unstable [amd64])' aptget install needscoolfoover0 -s
209 testsuccessequal 'Reading package lists...
210Building dependency tree...
211The following extra packages will be installed:
212 coolfoo coolfoover
213The following NEW packages will be installed:
214 coolfoo coolfoover needscoolfoover1
2150 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
216Inst coolfoo (1 unstable [amd64])
217Inst coolfoover (1 unstable [amd64])
218Inst needscoolfoover1 (1 unstable [amd64])
219Conf coolfoo (1 unstable [amd64])
220Conf coolfoover (1 unstable [amd64])
221Conf needscoolfoover1 (1 unstable [amd64])' aptget install needscoolfoover1 -s
222 testfailureequal "$BADPREFIX
223The following packages have unmet dependencies:
224 needscoolfoover2 : Depends: coolfoo:any (>= 2)
225E: Unable to correct problems, you have held broken packages." aptget install needscoolfoover2 -s
226 testfailureequal "$BADPREFIX
227The following packages have unmet dependencies:
228 needscoolfoover3 : Depends: coolfoo:any (>= 2)
229 Depends: coolbar (>= 3)
230E: Unable to correct problems, you have held broken packages." aptget install needscoolfoover3 -s
231}
232solveableinsinglearch3
233
234msgmsg 'switch to single architecture'
235configarchitecture 'amd64'
236
237solveableinsinglearch0
238testfailureequal 'Reading package lists...
239Building dependency tree...
240E: Unable to locate package needsfoo' aptget install needsfoo:i386 -s
241
242solveableinsinglearch1 'needsfooany'
243solveableinsinglearch1 'needsfoover1'
244testfailureequal "$NEEDSFOO2NATIVE" aptget install needsfoover2 -s
245solveableinsinglearch2
246solveableinsinglearch3