]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-612099-multiarch-conflicts
* apt-pkg/packagemanager.cc:
[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 aptget install libc6:i386 -t stable -y -qq 2>&1 > /dev/null
19 testdpkginstalled libc6:i386
20 testequal '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 testequal '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 testequal 'Reading package lists...
42 Building dependency tree...
43 Reading state information...
44 The following extra 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 testequal 'Reading package lists...
58 Building dependency tree...
59 Reading state information...
60 The following NEW packages will be installed:
61 foobar
62 The following packages will be upgraded:
63 libc6
64 1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
65 Inst libc6 [1.0] (2.0 testing [all])
66 Inst foobar (1.0 stable [i386])
67 Conf libc6 (2.0 testing [all])
68 Conf foobar (1.0 stable [i386])' aptget install foobar/stable libc6 -st testing
69
70 testequal 'Reading package lists...
71 Building dependency tree...
72 Reading state information...
73 The following packages will be upgraded:
74 libc6
75 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
76 Inst libc6 [1.0] (2.0 testing [all])
77 Conf libc6 (2.0 testing [all])' aptget upgrade -t testing -s
78 # FIXME: on amd64 systems this test wouldn't run with a real upgrade
79 # as APT (here i386) disagree about the native architecture, so
80 # we fake it here:
81 #aptget upgrade -y -qq 2>&1 > /dev/null
82 aptget purge libc6 -y -qq 2>&1 >/dev/null
83 aptget install libc6:i386 -y -qq 2>&1 >/dev/null
84 testdpkginstalled libc6:all
85
86 testequal 'Reading package lists...
87 Building dependency tree...
88 Reading state information...
89 The following NEW packages will be installed:
90 foobar
91 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
92 Inst foobar (1.0 stable [i386])
93 Conf foobar (1.0 stable [i386])' aptget install foobar/stable -st testing
94
95 testequal 'Reading package lists...
96 Building dependency tree...
97 Reading state information...
98 The following extra packages will be installed:
99 libc6:amd64
100 The following packages will be REMOVED:
101 libc6
102 The following NEW packages will be installed:
103 foobar:amd64 libc6:amd64
104 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
105 Remv libc6 [2.0]
106 Inst libc6:amd64 (1.0 stable [amd64])
107 Inst foobar:amd64 (1.0 stable [amd64])
108 Conf libc6:amd64 (1.0 stable [amd64])
109 Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64/stable -st testing
110
111
112 testequal "Reading package lists...
113 Building dependency tree...
114 Reading state information...
115 Selected version '1.0' (stable [i386]) for 'libc6'
116 The following packages will be DOWNGRADED:
117 libc6
118 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
119 Inst libc6 [2.0] (1.0 stable [i386])
120 Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s -q=0
121
122
123 buildsimplenativepackage 'libc6-same' 'i386' '1.0' 'stable' 'Multi-Arch: same'
124 buildsimplenativepackage 'libc6-same' 'amd64' '1.0' 'stable' 'Multi-Arch: same'
125 buildsimplenativepackage 'libc6-same' 'all' '2.0' 'testing'
126
127 buildsimplenativepackage 'foobar-same' 'i386' '1.0' 'stable' 'Depends: libc6-same'
128 buildsimplenativepackage 'foobar-same' 'amd64' '1.0' 'stable' 'Depends: libc6-same'
129
130 setupaptarchive
131
132 aptget install libc6-same:i386 -t stable -y -qq 2>&1 > /dev/null
133 testdpkginstalled libc6-same:i386
134
135 testequal 'Reading package lists...
136 Building dependency tree...
137 Reading state information...
138 The following NEW packages will be installed:
139 foobar-same
140 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
141 Inst foobar-same (1.0 stable [i386])
142 Conf foobar-same (1.0 stable [i386])' aptget install foobar-same -st stable
143
144 testequal 'Reading package lists...
145 Building dependency tree...
146 Reading state information...
147 The following extra packages will be installed:
148 libc6-same:amd64
149 The following NEW packages will be installed:
150 foobar-same:amd64 libc6-same:amd64
151 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
152 Inst libc6-same:amd64 (1.0 stable [amd64])
153 Inst foobar-same:amd64 (1.0 stable [amd64])
154 Conf libc6-same:amd64 (1.0 stable [amd64])
155 Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64 -st stable
156
157 testequal 'Reading package lists...
158 Building dependency tree...
159 Reading state information...
160 The following NEW packages will be installed:
161 libc6-same:amd64
162 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
163 Inst libc6-same:amd64 (1.0 stable [amd64])
164 Conf libc6-same:amd64 (1.0 stable [amd64])' aptget install libc6-same:amd64 -s -t stable
165
166 # FIXME: We should test installing libc6-same:amd64 here, but dpkg doesn't allow it currently
167
168 testequal 'Reading package lists...
169 Building dependency tree...
170 Reading state information...
171 The following packages will be upgraded:
172 libc6-same
173 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
174 Inst libc6-same [1.0] (2.0 testing [all])
175 Conf libc6-same (2.0 testing [all])' aptget upgrade -t testing -s
176 # FIXME: on amd64 systems this test wouldn't run with a real upgrade
177 # as APT (here i386) disagree about the native architecture, so
178 # we fake it here:
179 #aptget upgrade -y -qq 2>&1 > /dev/null
180 aptget purge libc6-same -y -qq 2>&1 >/dev/null
181 aptget install libc6-same:i386 -y -qq 2>&1 >/dev/null
182 testdpkginstalled libc6-same:all
183
184
185 testequal "Reading package lists...
186 Building dependency tree...
187 Reading state information...
188 Selected version '1.0' (stable [i386]) for 'libc6-same'
189 The following packages will be DOWNGRADED:
190 libc6-same
191 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
192 Inst libc6-same [2.0] (1.0 stable [i386])
193 Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s -q=0
194
195 testequal 'Reading package lists...
196 Building dependency tree...
197 Reading state information...
198 The following NEW packages will be installed:
199 foobar-same
200 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
201 Inst foobar-same (1.0 stable [i386])
202 Conf foobar-same (1.0 stable [i386])' aptget install foobar-same/stable -st testing
203
204 testequal 'Reading package lists...
205 Building dependency tree...
206 Reading state information...
207 The following extra packages will be installed:
208 libc6-same:amd64
209 The following packages will be REMOVED:
210 libc6-same
211 The following NEW packages will be installed:
212 foobar-same:amd64 libc6-same:amd64
213 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
214 Remv libc6-same [2.0]
215 Inst libc6-same:amd64 (1.0 stable [amd64])
216 Inst foobar-same:amd64 (1.0 stable [amd64])
217 Conf libc6-same:amd64 (1.0 stable [amd64])
218 Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64/stable -st testing