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
|
#!/bin/sh
set -e
TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'
native=$(getarchitecture 'native')
insertpackage 'unstable' 'foo' 'all' '1' 'Provides: stuff' 'important'
insertpackage 'unstable' 'bar' 'all' '1' 'Provides: stuff' 'optional'
insertpackage 'unstable' 'baz' 'all' '1' 'Provides: stuff' 'extra'
insertpackage 'unstable' 'awesome' 'all' '1' 'Depends: stuff'
setupaptarchive
testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
foo
The following NEW packages will be installed:
awesome foo
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst foo (1 unstable [all])
Inst awesome (1 unstable [all])
Conf foo (1 unstable [all])
Conf awesome (1 unstable [all])' aptget install awesome -s
testsuccessequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
awesome foo
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst foo (1 unstable [all])
Inst awesome (1 unstable [all])
Conf foo (1 unstable [all])
Conf awesome (1 unstable [all])' aptget install awesome foo -s
testsuccessequal "Reading package lists...
Building dependency tree...
Package 'bar' is not installed, so not removed
Package 'baz' is not installed, so not removed
The following additional packages will be installed:
foo
The following NEW packages will be installed:
awesome foo
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst foo (1 unstable [all])
Inst awesome (1 unstable [all])
Conf foo (1 unstable [all])
Conf awesome (1 unstable [all])" aptget install awesome bar- baz- -s
testsuccessequal "Reading package lists...
Building dependency tree...
Package 'foo' is not installed, so not removed
The following additional packages will be installed:
bar
The following NEW packages will be installed:
awesome bar
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst bar (1 unstable [all])
Inst awesome (1 unstable [all])
Conf bar (1 unstable [all])
Conf awesome (1 unstable [all])" aptget install awesome foo- -s
testsuccessequal "Reading package lists...
Building dependency tree...
Package 'foo' is not installed, so not removed
Package 'baz' is not installed, so not removed
The following additional packages will be installed:
bar
The following NEW packages will be installed:
awesome bar
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst bar (1 unstable [all])
Inst awesome (1 unstable [all])
Conf bar (1 unstable [all])
Conf awesome (1 unstable [all])" aptget install awesome foo- baz- -s
testsuccessequal "Reading package lists...
Building dependency tree...
Package 'foo' is not installed, so not removed
Package 'bar' is not installed, so not removed
The following additional packages will be installed:
baz
The following NEW packages will be installed:
awesome baz
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst baz (1 unstable [all])
Inst awesome (1 unstable [all])
Conf baz (1 unstable [all])
Conf awesome (1 unstable [all])" aptget install awesome foo- bar- -s
testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. baz:$native is not selected for install
2. baz:$native=1 is selected for install because:
1. awesome:$native=1 is selected for install
2. awesome:$native Depends stuff
[selected awesome:$native]
For context, additional choices that could not be installed:
* In awesome:$native Depends stuff:
- foo:$native=1 is not selected for install
- bar:$native=1 is not selected for install" aptget install awesome foo- bar- baz- -s --solver 3.0
testfailureequal "Reading package lists...
Building dependency tree...
Package 'foo' is not installed, so not removed
Package 'bar' is not installed, so not removed
Package 'baz' is not installed, so not removed
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:
The following packages have unmet dependencies:
awesome : Depends: stuff
E: Unable to correct problems, you have held broken packages." aptget install awesome foo- bar- baz- -s --solver internal
|