summaryrefslogtreecommitdiffstats
path: root/test/integration/test-bug-612099-multiarch-conflicts
blob: a005127b8cb861f31aa0f6260f91474dc7c4f92a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
#!/bin/sh
set -e

TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
allowremovemanual
configarchitecture 'i386' 'amd64'

buildsimplenativepackage 'libc6' 'i386' '1.0' 'stable'
buildsimplenativepackage 'libc6' 'amd64' '1.0' 'stable'
buildsimplenativepackage 'libc6' 'all' '2.0' 'testing'

buildsimplenativepackage 'foobar' 'i386' '1.0' 'stable' 'Depends: libc6'
buildsimplenativepackage 'foobar' 'amd64' '1.0' 'stable' 'Depends: libc6'

setupaptarchive

testsuccess aptget install libc6:i386 -t stable -y
testdpkginstalled libc6:i386
testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  libc6
The following NEW packages will be installed:
  libc6:amd64
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Remv libc6 [1.0]
Inst libc6:amd64 (1.0 stable [amd64])
Conf libc6:amd64 (1.0 stable [amd64])' aptget install libc6:amd64 -s -t stable

testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  foobar
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst foobar (1.0 stable [i386])
Conf foobar (1.0 stable [i386])' aptget install foobar -st stable

testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libc6:amd64
The following packages will be REMOVED:
  libc6
The following NEW packages will be installed:
  foobar:amd64 libc6:amd64
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
Remv libc6 [1.0]
Inst libc6:amd64 (1.0 stable [amd64])
Inst foobar:amd64 (1.0 stable [amd64])
Conf libc6:amd64 (1.0 stable [amd64])
Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64 -st stable

testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
Selected version '1.0' (stable [i386]) for 'foobar'
The following NEW packages will be installed:
  foobar
The following packages will be upgraded:
  libc6
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst libc6 [1.0] (2.0 testing [all])
Inst foobar (1.0 stable [i386])
Conf libc6 (2.0 testing [all])
Conf foobar (1.0 stable [i386])" aptget install foobar/stable libc6 -st testing

testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages will be upgraded:
  libc6
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst libc6 [1.0] (2.0 testing [all])
Conf libc6 (2.0 testing [all])' aptget upgrade -t testing -s
# FIXME: on amd64 systems this test wouldn't run with a real upgrade
# as APT (here i386) disagree about the native architecture, so
# we fake it here:
#aptget upgrade -y -qq >/dev/null 2>&1
testsuccess aptget purge libc6 -y
testsuccess aptget install libc6:i386 -y
testdpkginstalled libc6:all

testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
Selected version '1.0' (stable [i386]) for 'foobar'
The following NEW packages will be installed:
  foobar
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst foobar (1.0 stable [i386])
Conf foobar (1.0 stable [i386])" aptget install foobar/stable -st testing

testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
Selected version '1.0' (stable [amd64]) for 'foobar:amd64'
The following additional packages will be installed:
  libc6:amd64
The following packages will be REMOVED:
  libc6
The following NEW packages will be installed:
  foobar:amd64 libc6:amd64
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
Remv libc6 [2.0]
Inst libc6:amd64 (1.0 stable [amd64])
Inst foobar:amd64 (1.0 stable [amd64])
Conf libc6:amd64 (1.0 stable [amd64])
Conf foobar:amd64 (1.0 stable [amd64])" aptget install foobar:amd64/stable -st testing


testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
Selected version '1.0' (stable [i386]) for 'libc6'
The following packages will be DOWNGRADED:
  libc6
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Inst libc6 [2.0] (1.0 stable [i386])
Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s


buildsimplenativepackage 'libc6-same' 'i386' '1.0' 'stable' 'Multi-Arch: same'
buildsimplenativepackage 'libc6-same' 'amd64' '1.0' 'stable' 'Multi-Arch: same'
buildsimplenativepackage 'libc6-same' 'all' '2.0' 'testing'

buildsimplenativepackage 'foobar-same' 'i386' '1.0' 'stable' 'Depends: libc6-same'
buildsimplenativepackage 'foobar-same' 'amd64' '1.0' 'stable' 'Depends: libc6-same'

setupaptarchive

testsuccess aptget install libc6-same:i386 -t stable -y
testdpkginstalled libc6-same:i386

testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  foobar-same
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst foobar-same (1.0 stable [i386])
Conf foobar-same (1.0 stable [i386])' aptget install foobar-same -st stable

testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libc6-same:amd64
The following NEW packages will be installed:
  foobar-same:amd64 libc6-same:amd64
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst libc6-same:amd64 (1.0 stable [amd64])
Inst foobar-same:amd64 (1.0 stable [amd64])
Conf libc6-same:amd64 (1.0 stable [amd64])
Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64 -st stable

testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  libc6-same:amd64
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst libc6-same:amd64 (1.0 stable [amd64])
Conf libc6-same:amd64 (1.0 stable [amd64])' aptget install libc6-same:amd64 -s -t stable

# FIXME: We should test installing libc6-same:amd64 here, but dpkg doesn't allow it currently

testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages will be upgraded:
  libc6-same
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst libc6-same [1.0] (2.0 testing [all])
Conf libc6-same (2.0 testing [all])' aptget upgrade -t testing -s
# FIXME: on amd64 systems this test wouldn't run with a real upgrade
# as APT (here i386) disagree about the native architecture, so
# we fake it here:
#aptget upgrade -y -qq >/dev/null 2>&1
testsuccess aptget purge libc6-same -y
testsuccess aptget install libc6-same:i386 -y
testdpkginstalled libc6-same:all


testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
Selected version '1.0' (stable [i386]) for 'libc6-same'
The following packages will be DOWNGRADED:
  libc6-same
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Inst libc6-same [2.0] (1.0 stable [i386])
Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s

testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
Selected version '1.0' (stable [i386]) for 'foobar-same'
The following NEW packages will be installed:
  foobar-same
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst foobar-same (1.0 stable [i386])
Conf foobar-same (1.0 stable [i386])" aptget install foobar-same/stable -st testing

testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
Selected version '1.0' (stable [amd64]) for 'foobar-same:amd64'
The following additional packages will be installed:
  libc6-same:amd64
The following packages will be REMOVED:
  libc6-same
The following NEW packages will be installed:
  foobar-same:amd64 libc6-same:amd64
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
Remv libc6-same [2.0]
Inst libc6-same:amd64 (1.0 stable [amd64])
Inst foobar-same:amd64 (1.0 stable [amd64])
Conf libc6-same:amd64 (1.0 stable [amd64])
Conf foobar-same:amd64 (1.0 stable [amd64])" aptget install foobar-same:amd64/stable -st testing