4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
7 configarchitecture 'amd64' 'i386' 'armel'
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' 'hates-foo' 'amd64,i386' '1.0' 'Conflicts: foo'
13 insertpackage 'unstable' 'hates-foo-x64' 'amd64' '1.0' 'Conflicts: foo:amd64'
14 insertpackage 'unstable' 'hates-foo-x32' 'amd64' '1.0' 'Conflicts: foo:i386'
15 insertpackage 'unstable' 'foo' 'amd64,i386,armel' '1.0' 'Multi-Arch: foreign'
17 insertpackage 'unstable' 'cool-bar' 'amd64,i386' '1.0' 'Depends: bar-provider'
18 insertpackage 'unstable' 'cool-bar-x64' 'amd64' '1.0' 'Depends: bar-provider:amd64'
19 insertpackage 'unstable' 'cool-bar-x32' 'amd64' '1.0' 'Depends: bar-provider:i386'
20 insertpackage 'unstable' 'hates-bar' 'amd64,i386' '1.0' 'Conflicts: bar-provider'
21 insertpackage 'unstable' 'hates-bar-x64' 'amd64' '1.0' 'Conflicts: bar-provider:amd64'
22 insertpackage 'unstable' 'hates-bar-x32' 'amd64' '1.0' 'Conflicts: bar-provider:i386'
23 insertpackage 'unstable' 'bar' 'amd64,i386,armel' '1.0' 'Provides: bar-provider
28 testsuccessequal 'Reading package lists...
29 Building dependency tree...
30 The following additional packages will be installed:
32 The following NEW packages will be installed:
34 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
35 Inst foo (1.0 unstable [amd64])
36 Inst cool-foo:i386 (1.0 unstable [i386])
37 Conf foo (1.0 unstable [amd64])
38 Conf cool-foo:i386 (1.0 unstable [i386])' aptget install cool-foo:i386 -s
40 testsuccessequal 'Reading package lists...
41 Building dependency tree...
42 The following NEW packages will be installed:
44 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
45 Inst foo:i386 (1.0 unstable [i386])
46 Inst cool-foo (1.0 unstable [amd64])
47 Conf foo:i386 (1.0 unstable [i386])
48 Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:i386 -s
50 testsuccessequal 'Reading package lists...
51 Building dependency tree...
52 The following NEW packages will be installed:
54 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
55 Inst foo:armel (1.0 unstable [armel])
56 Inst cool-foo (1.0 unstable [amd64])
57 Conf foo:armel (1.0 unstable [armel])
58 Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:armel -s
60 testsuccessequal 'Reading package lists...
61 Building dependency tree...
62 The following additional packages will be installed:
64 The following NEW packages will be installed:
66 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
67 Inst bar (1.0 unstable [amd64])
68 Inst cool-bar:i386 (1.0 unstable [i386])
69 Conf bar (1.0 unstable [amd64])
70 Conf cool-bar:i386 (1.0 unstable [i386])' aptget install cool-bar:i386 -s
72 testsuccessequal 'Reading package lists...
73 Building dependency tree...
74 The following NEW packages will be installed:
76 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
77 Inst bar:i386 (1.0 unstable [i386])
78 Inst cool-bar (1.0 unstable [amd64])
79 Conf bar:i386 (1.0 unstable [i386])
80 Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:i386 -s
82 testsuccessequal 'Reading package lists...
83 Building dependency tree...
84 The following NEW packages will be installed:
86 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
87 Inst bar:armel (1.0 unstable [armel])
88 Inst cool-bar (1.0 unstable [amd64])
89 Conf bar:armel (1.0 unstable [armel])
90 Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:armel -s
92 testsuccessequal "Reading package lists...
93 Building dependency tree...
94 Note
, selecting
'bar:i386' instead of
'bar-provider:i386'
95 The following NEW packages will be installed
:
97 0 upgraded
, 2 newly installed
, 0 to remove and
0 not upgraded.
98 Inst bar
:i386
(1.0 unstable
[i386
])
99 Inst cool
-bar (1.0 unstable
[amd64
])
100 Conf bar
:i386
(1.0 unstable
[i386
])
101 Conf cool
-bar (1.0 unstable
[amd64
])" aptget install cool-bar bar-provider:i386 -s
103 satisfiable_in_singlearch() {
104 testsuccessequal 'Reading package lists...
105 Building dependency tree...
106 The following additional packages will be installed:
108 The following NEW packages will be installed:
110 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
111 Inst foo (1.0 unstable [amd64])
112 Inst cool-foo (1.0 unstable [amd64])
113 Conf foo (1.0 unstable [amd64])
114 Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 -s
116 testsuccessequal 'Reading package lists...
117 Building dependency tree...
118 The following NEW packages will be installed:
120 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
121 Inst foo (1.0 unstable [amd64])
122 Inst cool-foo (1.0 unstable [amd64])
123 Conf foo (1.0 unstable [amd64])
124 Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:amd64 -s
126 testsuccessequal 'Reading package lists...
127 Building dependency tree...
128 The following additional packages will be installed:
130 The following NEW packages will be installed:
132 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
133 Inst bar (1.0 unstable [amd64])
134 Inst cool-bar (1.0 unstable [amd64])
135 Conf bar (1.0 unstable [amd64])
136 Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 -s
138 testsuccessequal 'Reading package lists...
139 Building dependency tree...
140 The following NEW packages will be installed:
142 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
143 Inst bar (1.0 unstable [amd64])
144 Inst cool-bar (1.0 unstable [amd64])
145 Conf bar (1.0 unstable [amd64])
146 Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:amd64 -s
148 testsuccessequal "Reading package lists...
149 Building dependency tree...
150 Note
, selecting
'bar' instead of
'bar-provider'
151 The following NEW packages will be installed
:
153 0 upgraded
, 2 newly installed
, 0 to remove and
0 not upgraded.
154 Inst bar
(1.0 unstable
[amd64
])
155 Inst cool
-bar (1.0 unstable
[amd64
])
156 Conf bar
(1.0 unstable
[amd64
])
157 Conf cool
-bar (1.0 unstable
[amd64
])" aptget install cool-bar bar-provider -s
159 testsuccessequal 'Reading package lists...
160 Building dependency tree...
161 The following additional packages will be installed:
163 The following NEW packages will be installed:
165 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
166 Inst foo (1.0 unstable [amd64])
167 Inst cool-foo-x64 (1.0 unstable [amd64])
168 Conf foo (1.0 unstable [amd64])
169 Conf cool-foo-x64 (1.0 unstable [amd64])' aptget install cool-foo-x64 -s
173 BADPREFIX='Reading package lists...
174 Building dependency tree...
175 Some packages could not be installed. This may mean that you have
176 requested an impossible situation or if you are using the unstable
177 distribution that some required packages have not yet been created
178 or been moved out of Incoming.
179 The following information may help to resolve the situation:
181 testfailureequal "$BADPREFIX
182 The following packages have unmet dependencies
:
183 hates
-foo : Conflicts
: foo
186 E
: Unable to correct problems
, you have held broken packages.
" aptget install $1 hates-foo -s
187 testfailureequal "$BADPREFIX
188 The following packages have unmet dependencies
:
189 $2 : Conflicts
: foo
:$4
190 E
: Unable to correct problems
, you have held broken packages.
" aptget install $1 $2 -s
191 testsuccessequal "Reading package lists...
192 Building dependency tree...
193 The following NEW packages will be installed
:
195 0 upgraded
, 2 newly installed
, 0 to remove and
0 not upgraded.
196 Inst
$1 (1.0 unstable
[$4])
197 Inst
$3 (1.0 unstable
[amd64
])
198 Conf
$1 (1.0 unstable
[$4])
199 Conf
$3 (1.0 unstable
[amd64
])" aptget install $1 $3 -s
201 hatersgonnahate 'foo' 'hates-foo-x64' 'hates-foo-x32' 'amd64'
202 hatersgonnahate 'foo:i386' 'hates-foo-x32' 'hates-foo-x64' 'i386'
204 testsuccessequal 'Reading package lists...
205 Building dependency tree...
206 The following additional packages will be installed:
208 The following NEW packages will be installed:
209 cool-foo-x32 foo:i386
210 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
211 Inst foo:i386 (1.0 unstable [i386])
212 Inst cool-foo-x32 (1.0 unstable [amd64])
213 Conf foo:i386 (1.0 unstable [i386])
214 Conf cool-foo-x32 (1.0 unstable [amd64])' aptget install cool-foo-x32 -s
216 testsuccessequal 'Reading package lists...
217 Building dependency tree...
218 The following additional packages will be installed:
220 The following NEW packages will be installed:
221 bar:i386 cool-bar-x32
222 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
223 Inst bar:i386 (1.0 unstable [i386])
224 Inst cool-bar-x32 (1.0 unstable [amd64])
225 Conf bar:i386 (1.0 unstable [i386])
226 Conf cool-bar-x32 (1.0 unstable [amd64])' aptget install cool-bar-x32 -s
228 testsuccessequal 'Reading package lists...
229 Building dependency tree...
230 The following additional packages will be installed:
232 The following NEW packages will be installed:
234 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
235 Inst bar (1.0 unstable [amd64])
236 Inst cool-bar-x64 (1.0 unstable [amd64])
237 Conf bar (1.0 unstable [amd64])
238 Conf cool-bar-x64 (1.0 unstable [amd64])' aptget install cool-bar-x64 -s
241 satisfiable_in_singlearch
243 msgmsg 'switch to single architecture'
244 configarchitecture 'amd64'
246 satisfiable_in_singlearch
248 msgmsg 'switch to multi-arch with barbarian architecture'
250 insertinstalledpackage 'foo' 'armhf' '1.0' 'Multi-Arch: foreign'
251 insertinstalledpackage 'bar' 'armhf' '1.0' 'Provides: bar-provider
253 insertinstalledpackage 'bar-needer' 'armhf' '1.0' 'Depends: bar-provider'
255 testsuccess aptget check
256 testsuccessequal 'Reading package lists...
257 Building dependency tree...
258 The following additional packages will be installed:
260 The following packages will be REMOVED:
262 The following NEW packages will be installed:
264 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
266 Inst foo (1.0 unstable [amd64])
267 Inst cool-foo (1.0 unstable [amd64])
268 Conf foo (1.0 unstable [amd64])
269 Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo -s
270 testsuccessequal 'Reading package lists...
271 Building dependency tree...
272 The following additional packages will be installed:
274 The following packages will be REMOVED:
276 The following NEW packages will be installed:
278 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
279 Remv bar:armhf [1.0] [bar-needer:armhf ]
280 Inst bar (1.0 unstable [amd64])
281 Inst cool-bar (1.0 unstable [amd64])
282 Conf bar (1.0 unstable [amd64])
283 Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar -s
285 # a barbarian doesn't satisfy another either
286 insertinstalledpackage 'bar-needer2' 's390x' '1.0' 'Depends: bar-provider'
287 testfailure aptget check