]> git.saurik.com Git - apt.git/blame - test/integration/test-multiarch-foreign
just-in-time creation for (implicit) Provides
[apt.git] / test / integration / test-multiarch-foreign
CommitLineData
2b5c35c7
DK
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'
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
DK
29Building dependency tree...
30The following extra 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
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
DK
61Building dependency tree...
62The following extra 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
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])
101Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider:i386 -s -q=0
102
103satisfiable_in_singlearch() {
05f64ca2 104 testsuccessequal 'Reading package lists...
596ec43c
DK
105Building dependency tree...
106The following extra 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
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...
2b5c35c7
DK
128The following extra 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
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
DK
156Conf bar (1.0 unstable [amd64])
157Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider -s -q=0
2b5c35c7 158
05f64ca2 159 testsuccessequal 'Reading package lists...
2b5c35c7 160Building dependency tree...
596ec43c
DK
161The following extra packages will be installed:
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:
189 hates-foo-x64 : Conflicts: foo
190E: Unable to correct problems, you have held broken packages." aptget install $1 hates-foo-x64 -s
191 testfailureequal "$BADPREFIX
192The following packages have unmet dependencies:
193 hates-foo-x32 : Conflicts: foo:i386
194E: Unable to correct problems, you have held broken packages." aptget install $1 hates-foo-x32 -s
195}
196hatersgonnahate 'foo'
197hatersgonnahate 'foo:i386'
198
596ec43c 199#FIXME: do not work in single-arch as i386 isn't known at cache generation time
05f64ca2 200 testsuccessequal 'Reading package lists...
286afa36 201Building dependency tree...
596ec43c
DK
202The following extra packages will be installed:
203 foo
286afa36 204The following NEW packages will be installed:
596ec43c
DK
205 cool-foo-x32 foo
2060 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
207Inst foo (1.0 unstable [amd64])
208Inst cool-foo-x32 (1.0 unstable [amd64])
209Conf foo (1.0 unstable [amd64])
210Conf cool-foo-x32 (1.0 unstable [amd64])' aptget install cool-foo-x32 -s
211
05f64ca2 212 testsuccessequal 'Reading package lists...
596ec43c
DK
213Building dependency tree...
214The following extra packages will be installed:
215 bar
216The following NEW packages will be installed:
217 bar cool-bar-x32
286afa36
DK
2180 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
219Inst bar (1.0 unstable [amd64])
596ec43c 220Inst cool-bar-x32 (1.0 unstable [amd64])
286afa36 221Conf bar (1.0 unstable [amd64])
596ec43c 222Conf cool-bar-x32 (1.0 unstable [amd64])' aptget install cool-bar-x32 -s -q=0
286afa36 223
05f64ca2 224 testsuccessequal 'Reading package lists...
286afa36 225Building dependency tree...
596ec43c
DK
226The following extra packages will be installed:
227 bar
286afa36 228The following NEW packages will be installed:
596ec43c 229 bar cool-bar-x64
286afa36 2300 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
596ec43c
DK
231Inst bar (1.0 unstable [amd64])
232Inst cool-bar-x64 (1.0 unstable [amd64])
233Conf bar (1.0 unstable [amd64])
234Conf cool-bar-x64 (1.0 unstable [amd64])' aptget install cool-bar-x64 -s -q=0
235
236
237satisfiable_in_singlearch
238
239msgmsg 'switch to single architecture'
240configarchitecture 'amd64'
241
242satisfiable_in_singlearch