]> git.saurik.com Git - apt.git/blob - test/integration/test-multiarch-foreign
improve partial/ cleanup in abort and failure cases
[apt.git] / test / integration / test-multiarch-foreign
1 #!/bin/sh
2 set -e
3
4 TESTDIR=$(readlink -f $(dirname $0))
5 . $TESTDIR/framework
6 setupenvironment
7 configarchitecture 'amd64' 'i386' 'armel'
8
9 insertpackage 'unstable' 'cool-foo' 'amd64,i386' '1.0' 'Depends: foo'
10 insertpackage 'unstable' 'cool-foo-x64' 'amd64' '1.0' 'Depends: foo:amd64'
11 insertpackage 'unstable' 'cool-foo-x32' 'amd64' '1.0' 'Depends: foo:i386'
12 insertpackage 'unstable' 'foo' 'amd64,i386,armel' '1.0' 'Multi-Arch: foreign'
13
14 insertpackage 'unstable' 'cool-bar' 'amd64,i386' '1.0' 'Depends: bar-provider'
15 insertpackage 'unstable' 'cool-bar-x64' 'amd64' '1.0' 'Depends: bar-provider:amd64'
16 insertpackage 'unstable' 'cool-bar-x32' 'amd64' '1.0' 'Depends: bar-provider:i386'
17 insertpackage 'unstable' 'bar' 'amd64,i386,armel' '1.0' 'Provides: bar-provider
18 Multi-Arch: foreign'
19
20 setupaptarchive
21
22 testsuccessequal 'Reading package lists...
23 Building dependency tree...
24 The following extra packages will be installed:
25 foo
26 The following NEW packages will be installed:
27 cool-foo:i386 foo
28 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
29 Inst foo (1.0 unstable [amd64])
30 Inst cool-foo:i386 (1.0 unstable [i386])
31 Conf foo (1.0 unstable [amd64])
32 Conf cool-foo:i386 (1.0 unstable [i386])' aptget install cool-foo:i386 -s
33
34 testsuccessequal 'Reading package lists...
35 Building dependency tree...
36 The following NEW packages will be installed:
37 cool-foo foo:i386
38 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
39 Inst foo:i386 (1.0 unstable [i386])
40 Inst cool-foo (1.0 unstable [amd64])
41 Conf foo:i386 (1.0 unstable [i386])
42 Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:i386 -s
43
44 testsuccessequal 'Reading package lists...
45 Building dependency tree...
46 The following NEW packages will be installed:
47 cool-foo foo:armel
48 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
49 Inst foo:armel (1.0 unstable [armel])
50 Inst cool-foo (1.0 unstable [amd64])
51 Conf foo:armel (1.0 unstable [armel])
52 Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:armel -s
53
54 testsuccessequal 'Reading package lists...
55 Building dependency tree...
56 The following extra packages will be installed:
57 bar
58 The following NEW packages will be installed:
59 bar cool-bar:i386
60 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
61 Inst bar (1.0 unstable [amd64])
62 Inst cool-bar:i386 (1.0 unstable [i386])
63 Conf bar (1.0 unstable [amd64])
64 Conf cool-bar:i386 (1.0 unstable [i386])' aptget install cool-bar:i386 -s
65
66 testsuccessequal 'Reading package lists...
67 Building dependency tree...
68 The following NEW packages will be installed:
69 bar:i386 cool-bar
70 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
71 Inst bar:i386 (1.0 unstable [i386])
72 Inst cool-bar (1.0 unstable [amd64])
73 Conf bar:i386 (1.0 unstable [i386])
74 Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:i386 -s
75
76 testsuccessequal 'Reading package lists...
77 Building dependency tree...
78 The following NEW packages will be installed:
79 bar:armel cool-bar
80 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
81 Inst bar:armel (1.0 unstable [armel])
82 Inst cool-bar (1.0 unstable [amd64])
83 Conf bar:armel (1.0 unstable [armel])
84 Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:armel -s
85
86 testsuccessequal "Reading package lists...
87 Building dependency tree...
88 Note, selecting 'bar:i386' instead of 'bar-provider:i386'
89 The following NEW packages will be installed:
90 bar:i386 cool-bar
91 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
92 Inst bar:i386 (1.0 unstable [i386])
93 Inst cool-bar (1.0 unstable [amd64])
94 Conf bar:i386 (1.0 unstable [i386])
95 Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider:i386 -s -q=0
96
97 satisfiable_in_singlearch() {
98 testsuccessequal 'Reading package lists...
99 Building dependency tree...
100 The following extra packages will be installed:
101 foo
102 The following NEW packages will be installed:
103 cool-foo foo
104 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
105 Inst foo (1.0 unstable [amd64])
106 Inst cool-foo (1.0 unstable [amd64])
107 Conf foo (1.0 unstable [amd64])
108 Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 -s
109
110 testsuccessequal 'Reading package lists...
111 Building dependency tree...
112 The following NEW packages will be installed:
113 cool-foo foo
114 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
115 Inst foo (1.0 unstable [amd64])
116 Inst cool-foo (1.0 unstable [amd64])
117 Conf foo (1.0 unstable [amd64])
118 Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:amd64 -s
119
120 testsuccessequal 'Reading package lists...
121 Building dependency tree...
122 The following extra packages will be installed:
123 bar
124 The following NEW packages will be installed:
125 bar cool-bar
126 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
127 Inst bar (1.0 unstable [amd64])
128 Inst cool-bar (1.0 unstable [amd64])
129 Conf bar (1.0 unstable [amd64])
130 Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 -s
131
132 testsuccessequal 'Reading package lists...
133 Building dependency tree...
134 The following NEW packages will be installed:
135 bar cool-bar
136 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
137 Inst bar (1.0 unstable [amd64])
138 Inst cool-bar (1.0 unstable [amd64])
139 Conf bar (1.0 unstable [amd64])
140 Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:amd64 -s
141
142 testsuccessequal "Reading package lists...
143 Building dependency tree...
144 Note, selecting 'bar' instead of 'bar-provider'
145 The following NEW packages will be installed:
146 bar cool-bar
147 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
148 Inst bar (1.0 unstable [amd64])
149 Inst cool-bar (1.0 unstable [amd64])
150 Conf bar (1.0 unstable [amd64])
151 Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider -s -q=0
152
153 testsuccessequal 'Reading package lists...
154 Building dependency tree...
155 The following extra packages will be installed:
156 foo
157 The following NEW packages will be installed:
158 cool-foo-x64 foo
159 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
160 Inst foo (1.0 unstable [amd64])
161 Inst cool-foo-x64 (1.0 unstable [amd64])
162 Conf foo (1.0 unstable [amd64])
163 Conf cool-foo-x64 (1.0 unstable [amd64])' aptget install cool-foo-x64 -s
164 }
165
166 #FIXME: do not work in single-arch as i386 isn't known at cache generation time
167 testsuccessequal 'Reading package lists...
168 Building dependency tree...
169 The following extra packages will be installed:
170 foo
171 The following NEW packages will be installed:
172 cool-foo-x32 foo
173 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
174 Inst foo (1.0 unstable [amd64])
175 Inst cool-foo-x32 (1.0 unstable [amd64])
176 Conf foo (1.0 unstable [amd64])
177 Conf cool-foo-x32 (1.0 unstable [amd64])' aptget install cool-foo-x32 -s
178
179 testsuccessequal 'Reading package lists...
180 Building dependency tree...
181 The following extra packages will be installed:
182 bar
183 The following NEW packages will be installed:
184 bar cool-bar-x32
185 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
186 Inst bar (1.0 unstable [amd64])
187 Inst cool-bar-x32 (1.0 unstable [amd64])
188 Conf bar (1.0 unstable [amd64])
189 Conf cool-bar-x32 (1.0 unstable [amd64])' aptget install cool-bar-x32 -s -q=0
190
191 testsuccessequal 'Reading package lists...
192 Building dependency tree...
193 The following extra packages will be installed:
194 bar
195 The following NEW packages will be installed:
196 bar cool-bar-x64
197 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
198 Inst bar (1.0 unstable [amd64])
199 Inst cool-bar-x64 (1.0 unstable [amd64])
200 Conf bar (1.0 unstable [amd64])
201 Conf cool-bar-x64 (1.0 unstable [amd64])' aptget install cool-bar-x64 -s -q=0
202
203
204 satisfiable_in_singlearch
205
206 msgmsg 'switch to single architecture'
207 configarchitecture 'amd64'
208
209 satisfiable_in_singlearch