]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-multiarch-foreign
ignore for _apt inaccessible TMPDIR in pkgAcqChangelog
[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 -q=0
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 -q=0
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 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
199#FIXME: do not work in single-arch as i386 isn't known at cache generation time
200 testsuccessequal 'Reading package lists...
201Building dependency tree...
202The following additional packages will be installed:
203 foo
204The following NEW packages will be installed:
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
212 testsuccessequal 'Reading package lists...
213Building dependency tree...
214The following additional packages will be installed:
215 bar
216The following NEW packages will be installed:
217 bar cool-bar-x32
2180 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
219Inst bar (1.0 unstable [amd64])
220Inst cool-bar-x32 (1.0 unstable [amd64])
221Conf bar (1.0 unstable [amd64])
222Conf cool-bar-x32 (1.0 unstable [amd64])' aptget install cool-bar-x32 -s -q=0
223
224 testsuccessequal 'Reading package lists...
225Building dependency tree...
226The following additional packages will be installed:
227 bar
228The following NEW packages will be installed:
229 bar cool-bar-x64
2300 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
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