]>
Commit | Line | Data |
---|---|---|
6a910c9d DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
3abb6a6a DK |
4 | TESTDIR="$(readlink -f "$(dirname "$0")")" |
5 | . "$TESTDIR/framework" | |
6a910c9d | 6 | setupenvironment |
ea65d079 | 7 | configarchitecture 'i386' 'amd64' |
6a910c9d DK |
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 | ||
0440d936 | 18 | testsuccess aptget install libc6:i386 -t stable -y |
53ea1b56 | 19 | testdpkginstalled libc6:i386 |
25b86db1 | 20 | testsuccessequal 'Reading package lists... |
6a910c9d DK |
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 | ||
25b86db1 | 32 | testsuccessequal 'Reading package lists... |
6a910c9d DK |
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 | ||
25b86db1 | 41 | testsuccessequal 'Reading package lists... |
6a910c9d DK |
42 | Building dependency tree... |
43 | Reading state information... | |
e7ebb414 | 44 | The following additional packages will be installed: |
6a910c9d DK |
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 | ||
87d6947d | 57 | testsuccessequal "Reading package lists... |
6a910c9d DK |
58 | Building dependency tree... |
59 | Reading state information... | |
87d6947d | 60 | Selected version '1.0' (stable [i386]) for 'foobar' |
6a910c9d | 61 | The following NEW packages will be installed: |
28166356 DK |
62 | foobar |
63 | The following packages will be upgraded: | |
64 | libc6 | |
65 | 1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
ca238ede | 66 | Inst libc6 [1.0] (2.0 testing [all]) |
6a910c9d | 67 | Inst foobar (1.0 stable [i386]) |
ca238ede | 68 | Conf libc6 (2.0 testing [all]) |
87d6947d | 69 | Conf foobar (1.0 stable [i386])" aptget install foobar/stable libc6 -st testing |
6a910c9d | 70 | |
25b86db1 | 71 | testsuccessequal 'Reading package lists... |
6a910c9d DK |
72 | Building dependency tree... |
73 | Reading state information... | |
2a884c61 | 74 | Calculating upgrade... |
28166356 | 75 | The following packages will be upgraded: |
6a910c9d | 76 | libc6 |
28166356 | 77 | 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
ca238ede DK |
78 | Inst libc6 [1.0] (2.0 testing [all]) |
79 | Conf libc6 (2.0 testing [all])' aptget upgrade -t testing -s | |
53ea1b56 DK |
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: | |
7a2690a3 | 83 | #aptget upgrade -y -qq >/dev/null 2>&1 |
0440d936 DK |
84 | testsuccess aptget purge libc6 -y |
85 | testsuccess aptget install libc6:i386 -y | |
53ea1b56 | 86 | testdpkginstalled libc6:all |
6a910c9d | 87 | |
87d6947d | 88 | testsuccessequal "Reading package lists... |
6a910c9d DK |
89 | Building dependency tree... |
90 | Reading state information... | |
87d6947d | 91 | Selected version '1.0' (stable [i386]) for 'foobar' |
6a910c9d DK |
92 | The following NEW packages will be installed: |
93 | foobar | |
94 | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
28166356 | 95 | Inst foobar (1.0 stable [i386]) |
87d6947d | 96 | Conf foobar (1.0 stable [i386])" aptget install foobar/stable -st testing |
6a910c9d | 97 | |
87d6947d | 98 | testsuccessequal "Reading package lists... |
6a910c9d DK |
99 | Building dependency tree... |
100 | Reading state information... | |
87d6947d | 101 | Selected version '1.0' (stable [amd64]) for 'foobar:amd64' |
e7ebb414 | 102 | The following additional packages will be installed: |
28166356 DK |
103 | libc6:amd64 |
104 | The following packages will be REMOVED: | |
105 | libc6 | |
6a910c9d | 106 | The following NEW packages will be installed: |
28166356 DK |
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]) | |
6a910c9d | 111 | Inst foobar:amd64 (1.0 stable [amd64]) |
28166356 | 112 | Conf libc6:amd64 (1.0 stable [amd64]) |
87d6947d | 113 | Conf foobar:amd64 (1.0 stable [amd64])" aptget install foobar:amd64/stable -st testing |
6a910c9d DK |
114 | |
115 | ||
25b86db1 | 116 | testsuccessequal "Reading package lists... |
6a910c9d DK |
117 | Building dependency tree... |
118 | Reading state information... | |
119 | Selected version '1.0' (stable [i386]) for 'libc6' | |
28166356 | 120 | The following packages will be DOWNGRADED: |
6a910c9d | 121 | libc6 |
28166356 DK |
122 | 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded. |
123 | Inst libc6 [2.0] (1.0 stable [i386]) | |
87d6947d | 124 | Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s |
6a910c9d DK |
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 | ||
0440d936 | 136 | testsuccess aptget install libc6-same:i386 -t stable -y |
53ea1b56 | 137 | testdpkginstalled libc6-same:i386 |
6a910c9d | 138 | |
25b86db1 | 139 | testsuccessequal 'Reading package lists... |
6a910c9d DK |
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 | ||
25b86db1 | 148 | testsuccessequal 'Reading package lists... |
6a910c9d DK |
149 | Building dependency tree... |
150 | Reading state information... | |
e7ebb414 | 151 | The following additional packages will be installed: |
6a910c9d DK |
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 | ||
25b86db1 | 161 | testsuccessequal 'Reading package lists... |
6a910c9d DK |
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 | ||
25b86db1 | 172 | testsuccessequal 'Reading package lists... |
6a910c9d DK |
173 | Building dependency tree... |
174 | Reading state information... | |
2a884c61 | 175 | Calculating upgrade... |
28166356 | 176 | The following packages will be upgraded: |
6a910c9d | 177 | libc6-same |
28166356 | 178 | 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
ca238ede DK |
179 | Inst libc6-same [1.0] (2.0 testing [all]) |
180 | Conf libc6-same (2.0 testing [all])' aptget upgrade -t testing -s | |
53ea1b56 DK |
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: | |
7a2690a3 | 184 | #aptget upgrade -y -qq >/dev/null 2>&1 |
0440d936 DK |
185 | testsuccess aptget purge libc6-same -y |
186 | testsuccess aptget install libc6-same:i386 -y | |
53ea1b56 DK |
187 | testdpkginstalled libc6-same:all |
188 | ||
6a910c9d | 189 | |
25b86db1 | 190 | testsuccessequal "Reading package lists... |
6a910c9d DK |
191 | Building dependency tree... |
192 | Reading state information... | |
193 | Selected version '1.0' (stable [i386]) for 'libc6-same' | |
28166356 | 194 | The following packages will be DOWNGRADED: |
6a910c9d | 195 | libc6-same |
28166356 DK |
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]) | |
87d6947d | 198 | Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s |
6a910c9d | 199 | |
87d6947d | 200 | testsuccessequal "Reading package lists... |
6a910c9d DK |
201 | Building dependency tree... |
202 | Reading state information... | |
87d6947d | 203 | Selected version '1.0' (stable [i386]) for 'foobar-same' |
6a910c9d DK |
204 | The following NEW packages will be installed: |
205 | foobar-same | |
206 | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
28166356 | 207 | Inst foobar-same (1.0 stable [i386]) |
87d6947d | 208 | Conf foobar-same (1.0 stable [i386])" aptget install foobar-same/stable -st testing |
6a910c9d | 209 | |
87d6947d | 210 | testsuccessequal "Reading package lists... |
6a910c9d DK |
211 | Building dependency tree... |
212 | Reading state information... | |
87d6947d | 213 | Selected version '1.0' (stable [amd64]) for 'foobar-same:amd64' |
e7ebb414 | 214 | The following additional packages will be installed: |
28166356 DK |
215 | libc6-same:amd64 |
216 | The following packages will be REMOVED: | |
217 | libc6-same | |
6a910c9d | 218 | The following NEW packages will be installed: |
28166356 DK |
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]) | |
6a910c9d | 223 | Inst foobar-same:amd64 (1.0 stable [amd64]) |
28166356 | 224 | Conf libc6-same:amd64 (1.0 stable [amd64]) |
87d6947d | 225 | Conf foobar-same:amd64 (1.0 stable [amd64])" aptget install foobar-same:amd64/stable -st testing |