]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-612099-multiarch-conflicts
test: Always install dpkg into our tests, regardless of MA
[apt.git] / test / integration / test-bug-612099-multiarch-conflicts
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6 setupenvironment
7 configarchitecture 'i386' 'amd64'
8
9 buildsimplenativepackage 'libc6' 'i386' '1.0' 'stable'
10 buildsimplenativepackage 'libc6' 'amd64' '1.0' 'stable'
11 buildsimplenativepackage 'libc6' 'all' '2.0' 'testing'
12
13 buildsimplenativepackage 'foobar' 'i386' '1.0' 'stable' 'Depends: libc6'
14 buildsimplenativepackage 'foobar' 'amd64' '1.0' 'stable' 'Depends: libc6'
15
16 setupaptarchive
17
18 testsuccess aptget install libc6:i386 -t stable -y
19 testdpkginstalled libc6:i386
20 testsuccessequal 'Reading package lists...
21 Building dependency tree...
22 Reading state information...
23 The following packages will be REMOVED:
24 libc6
25 The following NEW packages will be installed:
26 libc6:amd64
27 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
28 Remv libc6 [1.0]
29 Inst libc6:amd64 (1.0 stable [amd64])
30 Conf libc6:amd64 (1.0 stable [amd64])' aptget install libc6:amd64 -s -t stable
31
32 testsuccessequal 'Reading package lists...
33 Building dependency tree...
34 Reading state information...
35 The following NEW packages will be installed:
36 foobar
37 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
38 Inst foobar (1.0 stable [i386])
39 Conf foobar (1.0 stable [i386])' aptget install foobar -st stable
40
41 testsuccessequal 'Reading package lists...
42 Building dependency tree...
43 Reading state information...
44 The following additional packages will be installed:
45 libc6:amd64
46 The following packages will be REMOVED:
47 libc6
48 The following NEW packages will be installed:
49 foobar:amd64 libc6:amd64
50 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
51 Remv libc6 [1.0]
52 Inst libc6:amd64 (1.0 stable [amd64])
53 Inst foobar:amd64 (1.0 stable [amd64])
54 Conf libc6:amd64 (1.0 stable [amd64])
55 Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64 -st stable
56
57 testsuccessequal "Reading package lists...
58 Building dependency tree...
59 Reading state information...
60 Selected version '1.0' (stable [i386]) for 'foobar'
61 The following NEW packages will be installed:
62 foobar
63 The following packages will be upgraded:
64 libc6
65 1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
66 Inst libc6 [1.0] (2.0 testing [all])
67 Inst foobar (1.0 stable [i386])
68 Conf libc6 (2.0 testing [all])
69 Conf foobar (1.0 stable [i386])" aptget install foobar/stable libc6 -st testing
70
71 testsuccessequal 'Reading package lists...
72 Building dependency tree...
73 Reading state information...
74 Calculating upgrade...
75 The following packages will be upgraded:
76 libc6
77 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
78 Inst libc6 [1.0] (2.0 testing [all])
79 Conf libc6 (2.0 testing [all])' aptget upgrade -t testing -s
80 # FIXME: on amd64 systems this test wouldn't run with a real upgrade
81 # as APT (here i386) disagree about the native architecture, so
82 # we fake it here:
83 #aptget upgrade -y -qq >/dev/null 2>&1
84 testsuccess aptget purge libc6 -y
85 testsuccess aptget install libc6:i386 -y
86 testdpkginstalled libc6:all
87
88 testsuccessequal "Reading package lists...
89 Building dependency tree...
90 Reading state information...
91 Selected version '1.0' (stable [i386]) for 'foobar'
92 The following NEW packages will be installed:
93 foobar
94 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
95 Inst foobar (1.0 stable [i386])
96 Conf foobar (1.0 stable [i386])" aptget install foobar/stable -st testing
97
98 testsuccessequal "Reading package lists...
99 Building dependency tree...
100 Reading state information...
101 Selected version '1.0' (stable [amd64]) for 'foobar:amd64'
102 The following additional packages will be installed:
103 libc6:amd64
104 The following packages will be REMOVED:
105 libc6
106 The following NEW packages will be installed:
107 foobar:amd64 libc6:amd64
108 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
109 Remv libc6 [2.0]
110 Inst libc6:amd64 (1.0 stable [amd64])
111 Inst foobar:amd64 (1.0 stable [amd64])
112 Conf libc6:amd64 (1.0 stable [amd64])
113 Conf foobar:amd64 (1.0 stable [amd64])" aptget install foobar:amd64/stable -st testing
114
115
116 testsuccessequal "Reading package lists...
117 Building dependency tree...
118 Reading state information...
119 Selected version '1.0' (stable [i386]) for 'libc6'
120 The following packages will be DOWNGRADED:
121 libc6
122 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
123 Inst libc6 [2.0] (1.0 stable [i386])
124 Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s
125
126
127 buildsimplenativepackage 'libc6-same' 'i386' '1.0' 'stable' 'Multi-Arch: same'
128 buildsimplenativepackage 'libc6-same' 'amd64' '1.0' 'stable' 'Multi-Arch: same'
129 buildsimplenativepackage 'libc6-same' 'all' '2.0' 'testing'
130
131 buildsimplenativepackage 'foobar-same' 'i386' '1.0' 'stable' 'Depends: libc6-same'
132 buildsimplenativepackage 'foobar-same' 'amd64' '1.0' 'stable' 'Depends: libc6-same'
133
134 setupaptarchive
135
136 testsuccess aptget install libc6-same:i386 -t stable -y
137 testdpkginstalled libc6-same:i386
138
139 testsuccessequal 'Reading package lists...
140 Building dependency tree...
141 Reading state information...
142 The following NEW packages will be installed:
143 foobar-same
144 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
145 Inst foobar-same (1.0 stable [i386])
146 Conf foobar-same (1.0 stable [i386])' aptget install foobar-same -st stable
147
148 testsuccessequal 'Reading package lists...
149 Building dependency tree...
150 Reading state information...
151 The following additional packages will be installed:
152 libc6-same:amd64
153 The following NEW packages will be installed:
154 foobar-same:amd64 libc6-same:amd64
155 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
156 Inst libc6-same:amd64 (1.0 stable [amd64])
157 Inst foobar-same:amd64 (1.0 stable [amd64])
158 Conf libc6-same:amd64 (1.0 stable [amd64])
159 Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64 -st stable
160
161 testsuccessequal 'Reading package lists...
162 Building dependency tree...
163 Reading state information...
164 The following NEW packages will be installed:
165 libc6-same:amd64
166 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
167 Inst libc6-same:amd64 (1.0 stable [amd64])
168 Conf libc6-same:amd64 (1.0 stable [amd64])' aptget install libc6-same:amd64 -s -t stable
169
170 # FIXME: We should test installing libc6-same:amd64 here, but dpkg doesn't allow it currently
171
172 testsuccessequal 'Reading package lists...
173 Building dependency tree...
174 Reading state information...
175 Calculating upgrade...
176 The following packages will be upgraded:
177 libc6-same
178 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
179 Inst libc6-same [1.0] (2.0 testing [all])
180 Conf libc6-same (2.0 testing [all])' aptget upgrade -t testing -s
181 # FIXME: on amd64 systems this test wouldn't run with a real upgrade
182 # as APT (here i386) disagree about the native architecture, so
183 # we fake it here:
184 #aptget upgrade -y -qq >/dev/null 2>&1
185 testsuccess aptget purge libc6-same -y
186 testsuccess aptget install libc6-same:i386 -y
187 testdpkginstalled libc6-same:all
188
189
190 testsuccessequal "Reading package lists...
191 Building dependency tree...
192 Reading state information...
193 Selected version '1.0' (stable [i386]) for 'libc6-same'
194 The following packages will be DOWNGRADED:
195 libc6-same
196 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
197 Inst libc6-same [2.0] (1.0 stable [i386])
198 Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s
199
200 testsuccessequal "Reading package lists...
201 Building dependency tree...
202 Reading state information...
203 Selected version '1.0' (stable [i386]) for 'foobar-same'
204 The following NEW packages will be installed:
205 foobar-same
206 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
207 Inst foobar-same (1.0 stable [i386])
208 Conf foobar-same (1.0 stable [i386])" aptget install foobar-same/stable -st testing
209
210 testsuccessequal "Reading package lists...
211 Building dependency tree...
212 Reading state information...
213 Selected version '1.0' (stable [amd64]) for 'foobar-same:amd64'
214 The following additional packages will be installed:
215 libc6-same:amd64
216 The following packages will be REMOVED:
217 libc6-same
218 The following NEW packages will be installed:
219 foobar-same:amd64 libc6-same:amd64
220 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
221 Remv libc6-same [2.0]
222 Inst libc6-same:amd64 (1.0 stable [amd64])
223 Inst foobar-same:amd64 (1.0 stable [amd64])
224 Conf libc6-same:amd64 (1.0 stable [amd64])
225 Conf foobar-same:amd64 (1.0 stable [amd64])" aptget install foobar-same:amd64/stable -st testing