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 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418
|
#!/bin/sh
set -e
TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
allowremovemanual
configarchitecture 'amd64' 'i386'
insertpackage 'unstable' 'foo' 'amd64,i386' '1' 'Multi-Arch: allowed'
insertpackage 'unstable' 'needsfoo' 'amd64,i386' '1' 'Depends: foo'
insertpackage 'unstable' 'needsfooany' 'amd64,i386' '1' 'Depends: foo:any'
insertpackage 'unstable' 'needsfoover1' 'amd64,i386' '1' 'Depends: foo:any (>= 1)'
insertpackage 'unstable' 'needsfoover2' 'amd64,i386' '1' 'Depends: foo:any (>= 2)'
insertpackage 'unstable' 'hatesfoo' 'amd64' '1' 'Conflicts: foo'
insertpackage 'unstable' 'hatesfooany' 'amd64' '1' 'Conflicts: foo:any' # this makes no sense�
insertpackage 'unstable' 'hatesfoonative' 'amd64' '1' 'Conflicts: foo:amd64'
insertpackage 'unstable' 'coolfoo' 'amd64' '1' 'Multi-Arch:allowed
Provides: coolbar'
insertpackage 'unstable' 'coolfoover' 'amd64' '1' 'Multi-Arch:allowed
Provides: coolbar (= 2)'
insertpackage 'unstable' 'needscoolfoo' 'amd64,i386' '1' 'Depends: coolfoo, coolbar'
insertpackage 'unstable' 'needscoolfooany' 'amd64,i386' '1' 'Depends: coolfoo:any, coolbar:any'
insertpackage 'unstable' 'needscoolfoover0' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar:any'
insertpackage 'unstable' 'needscoolfoover1' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar:any (>= 1)'
insertpackage 'unstable' 'needscoolfoover2' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar:any (>= 1)'
insertpackage 'unstable' 'needscoolfoover3' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar:any (>= 3)'
setupaptarchive
BADPREFIX='Reading package lists...
Building dependency tree...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
'
solveableinsinglearch0() {
testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
foo
The following NEW packages will be installed:
foo needsfoo
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst foo (1 unstable [amd64])
Inst needsfoo (1 unstable [amd64])
Conf foo (1 unstable [amd64])
Conf needsfoo (1 unstable [amd64])' aptget install needsfoo -s
}
solveableinsinglearch0
testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
foo:i386
The following NEW packages will be installed:
foo:i386 needsfoo:i386
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst foo:i386 (1 unstable [i386])
Inst needsfoo:i386 (1 unstable [i386])
Conf foo:i386 (1 unstable [i386])
Conf needsfoo:i386 (1 unstable [i386])' aptget install needsfoo:i386 -s
# FIXME: same problem, but two different unmet dependency messages depending on install order
testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. needsfoo:i386=1 is selected for install
2. needsfoo:i386 Depends foo:i386
but none of the choices are installable:
- foo:i386 is not selected for install because:
1. foo:amd64=1 is selected for install
2. foo:i386 Conflicts foo" aptget install needsfoo:i386 foo:amd64 -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
foo : Conflicts: foo:i386 but 1 is to be installed
foo:i386 : Conflicts: foo but 1 is to be installed
E: Unable to correct problems, you have held broken packages." aptget install needsfoo:i386 foo:amd64 -s --solver internal
testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. needsfoo:i386=1 is selected for install
2. needsfoo:i386 Depends foo:i386
but none of the choices are installable:
- foo:i386 is not selected for install because:
1. foo:amd64=1 is selected for install
2. foo:i386 Conflicts foo" aptget install foo:amd64 needsfoo:i386 -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
needsfoo:i386 : Depends: foo:i386 but it is not installable
E: Unable to correct problems, you have held broken packages." aptget install foo:amd64 needsfoo:i386 -s --solver internal
testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. needsfoo:amd64=1 is selected for install
2. needsfoo:amd64 Depends foo
but none of the choices are installable:
- foo:amd64 is not selected for install because:
1. foo:i386=1 is selected for install
2. foo:amd64 Conflicts foo:i386" aptget install needsfoo foo:i386 -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
foo : Conflicts: foo:i386 but 1 is to be installed
foo:i386 : Conflicts: foo but 1 is to be installed
E: Unable to correct problems, you have held broken packages." aptget install needsfoo foo:i386 -s --solver internal
solveableinsinglearch1() {
testsuccessequal "Reading package lists...
Building dependency tree...
The following additional packages will be installed:
foo
The following NEW packages will be installed:
foo $1
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst foo (1 unstable [amd64])
Inst $1 (1 unstable [amd64])
Conf foo (1 unstable [amd64])
Conf $1 (1 unstable [amd64])" aptget install $1 -s
}
testneedsfooallgood() {
solveableinsinglearch1 $1
testsuccessequal "Reading package lists...
Building dependency tree...
The following additional packages will be installed:
foo
The following NEW packages will be installed:
foo $1:i386
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst foo (1 unstable [amd64])
Inst $1:i386 (1 unstable [i386])
Conf foo (1 unstable [amd64])
Conf $1:i386 (1 unstable [i386])" aptget install $1:i386 -s
testsuccessequal "Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
foo:i386 $1:i386
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst foo:i386 (1 unstable [i386])
Inst $1:i386 (1 unstable [i386])
Conf foo:i386 (1 unstable [i386])
Conf $1:i386 (1 unstable [i386])" aptget install $1:i386 foo:i386 -s
testsuccessequal "Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
foo:i386 $1
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst foo:i386 (1 unstable [i386])
Inst $1 (1 unstable [amd64])
Conf foo:i386 (1 unstable [i386])
Conf $1 (1 unstable [amd64])" aptget install $1 foo:i386 -s
}
testneedsfooallgood 'needsfooany'
testneedsfooallgood 'needsfoover1'
if [ "$APT_SOLVER" != "internal" ]; then
NEEDSFOO2NATIVE="$BADPREFIX
The following packages have unmet dependencies:
needsfoover2 : Depends: foo:any (>= 2)
E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. needsfoover2:amd64=1 is selected for install
2. needsfoover2:amd64 Depends foo:any (>= 2)
but none of the choices are installable:
[no choices]"
NEEDSFOO2FOREIGN="$BADPREFIX
The following packages have unmet dependencies:
needsfoover2:i386 : Depends: foo:any (>= 2)
E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. needsfoover2:i386=1 is selected for install
2. needsfoover2:i386 Depends foo:any (>= 2)
but none of the choices are installable:
[no choices]"
else
NEEDSFOO2NATIVE="$BADPREFIX
The following packages have unmet dependencies:
needsfoover2 : Depends: foo:any (>= 2)
E: Unable to correct problems, you have held broken packages."
NEEDSFOO2FOREIGN="$BADPREFIX
The following packages have unmet dependencies:
needsfoover2:i386 : Depends: foo:any (>= 2)
E: Unable to correct problems, you have held broken packages."
fi
testfailureequal "$NEEDSFOO2NATIVE" aptget install needsfoover2 -s
testfailureequal "$NEEDSFOO2FOREIGN" aptget install needsfoover2:i386 -s
testfailureequal "$NEEDSFOO2FOREIGN" aptget install needsfoover2:i386 foo:i386 -s
testfailureequal "$NEEDSFOO2NATIVE" aptget install needsfoover2 foo:i386 -s
solveableinsinglearch2() {
testfailuremsg 'E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. foo:amd64=1 is selected for install
2. foo:amd64=1 is not selected for install because:
1. hatesfoo:amd64=1 is selected for install
2. hatesfoo:amd64 Conflicts foo' aptget install foo hatesfoo -s --solver 3.0
if [ "$(getarchitectures)" = "amd64 " ]; then
testfailuremsg 'E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. foo:amd64=1 is selected for install
2. foo:amd64=1 is not selected for install because:
1. hatesfooany:amd64=1 is selected for install
2. hatesfooany:amd64 Conflicts foo:any' aptget install foo hatesfooany -s --solver 3.0
else
testfailuremsg 'E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. foo:amd64=1 is selected for install
2. foo:amd64=1 is not selected for install because:
1. hatesfooany:amd64=1 is selected for install
2. hatesfooany:amd64 Conflicts foo:any
[selected hatesfooany:amd64]' aptget install foo hatesfooany -s --solver 3.0
fi
testfailuremsg 'E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. foo:amd64=1 is selected for install
2. foo:amd64=1 is not selected for install because:
1. hatesfoonative:amd64=1 is selected for install
2. hatesfoonative:amd64 Conflicts foo:amd64' aptget install foo hatesfoonative -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
hatesfoo : Conflicts: foo but 1 is to be installed
E: Unable to correct problems, you have held broken packages." aptget install foo hatesfoo -s --solver internal
# the message differs slightly between single and multiarch
testfailuremsg 'E: Unable to correct problems, you have held broken packages.' aptget install foo hatesfooany -s --solver internal
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
hatesfoonative : Conflicts: foo:amd64
E: Unable to correct problems, you have held broken packages." aptget install foo hatesfoonative -s --solver internal
}
solveableinsinglearch2
testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. foo:i386=1 is selected for install
2. foo:i386=1 is not selected for install because:
1. hatesfoo:amd64=1 is selected for install
2. hatesfoo:amd64 Conflicts foo:i386" aptget install foo:i386 hatesfoo -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
hatesfoo : Conflicts: foo:i386 but 1 is to be installed
E: Unable to correct problems, you have held broken packages." aptget install foo:i386 hatesfoo -s --solver internal
testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. foo:i386=1 is selected for install
2. foo:i386=1 is not selected for install because:
1. hatesfooany:amd64=1 is selected for install
2. hatesfooany:amd64 Conflicts foo:any
[selected hatesfooany:amd64]" aptget install foo:i386 hatesfooany -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
hatesfooany : Conflicts: foo:any
E: Unable to correct problems, you have held broken packages." aptget install foo:i386 hatesfooany -s --solver internal
testsuccessequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
foo:i386 hatesfoonative
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst foo:i386 (1 unstable [i386])
Inst hatesfoonative (1 unstable [amd64])
Conf foo:i386 (1 unstable [i386])
Conf hatesfoonative (1 unstable [amd64])' aptget install foo:i386 hatesfoonative -s
testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. needscoolfoo:i386=1 is selected for install
2. needscoolfoo:i386 Depends coolfoo:i386
but none of the choices are installable:
[no choices]" aptget install needscoolfoo:i386 -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
needscoolfoo:i386 : Depends: coolfoo:i386 but it is not installable
Depends: coolbar:i386 but it is not installable
E: Unable to correct problems, you have held broken packages." aptget install needscoolfoo:i386 -s --solver internal
solveneedscoolfooanyin() {
local NEEDSCOOL='needscoolfooany'
if [ "$1" != 'amd64' ]; then NEEDSCOOL="${NEEDSCOOL}:$1"; fi
testsuccessequal "Reading package lists...
Building dependency tree...
The following additional packages will be installed:
coolfoo
The following NEW packages will be installed:
coolfoo $NEEDSCOOL
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst coolfoo (1 unstable [amd64])
Inst $NEEDSCOOL (1 unstable [$1])
Conf coolfoo (1 unstable [amd64])
Conf $NEEDSCOOL (1 unstable [$1])" aptget install $NEEDSCOOL -s
}
solveneedscoolfooanyin 'i386'
solveableinsinglearch3() {
testsuccessequal "Reading package lists...
Building dependency tree...
The following additional packages will be installed:
coolfoo
The following NEW packages will be installed:
coolfoo needscoolfoo
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst coolfoo (1 unstable [amd64])
Inst needscoolfoo (1 unstable [amd64])
Conf coolfoo (1 unstable [amd64])
Conf needscoolfoo (1 unstable [amd64])" aptget install needscoolfoo -s
testsuccessequal "Reading package lists...
Building dependency tree...
The following additional packages will be installed:
coolfoo
The following NEW packages will be installed:
coolfoo coolfoover needscoolfoo
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Inst coolfoo (1 unstable [amd64])
Inst coolfoover (1 unstable [amd64])
Inst needscoolfoo (1 unstable [amd64])
Conf coolfoo (1 unstable [amd64])
Conf coolfoover (1 unstable [amd64])
Conf needscoolfoo (1 unstable [amd64])" aptget install needscoolfoo coolfoover -s
solveneedscoolfooanyin 'amd64'
testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
coolfoo
The following NEW packages will be installed:
coolfoo needscoolfoover0
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst coolfoo (1 unstable [amd64])
Inst needscoolfoover0 (1 unstable [amd64])
Conf coolfoo (1 unstable [amd64])
Conf needscoolfoover0 (1 unstable [amd64])' aptget install needscoolfoover0 -s
testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
coolfoo coolfoover
The following NEW packages will be installed:
coolfoo coolfoover needscoolfoover1
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Inst coolfoo (1 unstable [amd64])
Inst coolfoover (1 unstable [amd64])
Inst needscoolfoover1 (1 unstable [amd64])
Conf coolfoo (1 unstable [amd64])
Conf coolfoover (1 unstable [amd64])
Conf needscoolfoover1 (1 unstable [amd64])' aptget install needscoolfoover1 -s
testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. needscoolfoover2:amd64=1 is selected for install
2. needscoolfoover2:amd64 Depends coolfoo:any (>= 2)
but none of the choices are installable:
[no choices]" aptget install needscoolfoover2 -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
needscoolfoover2 : Depends: coolfoo:any (>= 2)
E: Unable to correct problems, you have held broken packages." aptget install needscoolfoover2 -s --solver internal
testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. needscoolfoover3:amd64=1 is selected for install
2. needscoolfoover3:amd64 Depends coolfoo:any (>= 2)
but none of the choices are installable:
[no choices]" aptget install needscoolfoover3 -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
needscoolfoover3 : Depends: coolfoo:any (>= 2)
Depends: coolbar:any (>= 3)
E: Unable to correct problems, you have held broken packages." aptget install needscoolfoover3 -s --solver internal
}
solveableinsinglearch3
msgmsg 'switch to single architecture'
configarchitecture 'amd64'
solveableinsinglearch0
testfailureequal 'Reading package lists...
Building dependency tree...
E: Unable to locate package needsfoo:i386' aptget install needsfoo:i386 -s
solveableinsinglearch1 'needsfooany'
solveableinsinglearch1 'needsfoover1'
testfailureequal "$NEEDSFOO2NATIVE" aptget install needsfoover2 -s
solveableinsinglearch2
solveableinsinglearch3
testempty dpkg -C
msgmsg 'multi-arch with barbarian archs'
configarchitecture 'amd64' 'i386'
insertinstalledpackage 'foo' 'armel' '1' 'Multi-Arch: allowed'
insertinstalledpackage 'coolfoo' 'armel' '1' 'Multi-Arch:allowed
Provides: coolbar'
insertinstalledpackage 'bar-needer' 'armel' '1.0' 'Depends: coolbar'
insertinstalledpackage 'bar-any-needer' 'armel' '1.0' 'Depends: coolbar:any'
insertinstalledpackage 'bar-armel-needer' 'armel' '1.0' 'Depends: coolbar:armel'
testsuccess aptget check
testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
foo
The following packages will be REMOVED:
foo:armel
The following NEW packages will be installed:
foo needsfooany
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
Remv foo:armel [1]
Inst foo (1 unstable [amd64])
Inst needsfooany (1 unstable [amd64])
Conf foo (1 unstable [amd64])
Conf needsfooany (1 unstable [amd64])' aptget install needsfooany -s
testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
foo
The following packages will be REMOVED:
foo:armel
The following NEW packages will be installed:
foo needsfooany:i386
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
Remv foo:armel [1]
Inst foo (1 unstable [amd64])
Inst needsfooany:i386 (1 unstable [i386])
Conf foo (1 unstable [amd64])
Conf needsfooany:i386 (1 unstable [i386])' aptget install needsfooany:i386 -s
testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
coolfoo
The following packages will be REMOVED:
bar-armel-needer:armel bar-needer:armel coolfoo:armel
The following NEW packages will be installed:
coolfoo needscoolfoover0
0 upgraded, 2 newly installed, 3 to remove and 0 not upgraded.
Remv bar-armel-needer:armel [1.0]
Remv bar-needer:armel [1.0]
Remv coolfoo:armel [1] [bar-any-needer:armel ]
Inst coolfoo (1 unstable [amd64])
Inst needscoolfoover0 (1 unstable [amd64])
Conf coolfoo (1 unstable [amd64])
Conf needscoolfoover0 (1 unstable [amd64])' aptget install needscoolfoover0 -s
|