File: test-solver-recommends-depends

package info (click to toggle)
apt 3.1.13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,764 kB
  • sloc: cpp: 71,085; sh: 31,750; xml: 5,553; perl: 217; python: 197; ansic: 191; makefile: 41
file content (54 lines) | stat: -rwxr-xr-x 1,701 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
set -e

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

insertpackage 'unstable' 'a' 'all' '2'
insertpackage 'unstable' 'b' 'all' '2'
insertpackage 'unstable' 'x' 'all' '3' 'Depends: xx
Recommends: b'
insertpackage 'unstable' 'xx' 'all' '3' 'Depends: a | b
Recommends: b'
insertpackage 'installed,unstable' 'recommends-and-enhances' 'all' '3' 'Recommends: b
Enhances:b'

setupaptarchive

msgmsg "Test that the Enhances does not confuse the Recommends algorithm"
testsuccessequal "Reading package lists...
Building dependency tree...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." apt full-upgrade -s

msgmsg "Test that the Recommends does not influence the Depends"
testsuccessequal "The following additional packages will be installed:
  a b
The following NEW packages will be installed:
  a b xx
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Inst a (2 unstable [all])
Inst b (2 unstable [all])
Inst xx (3 unstable [all])
Conf a (2 unstable [all])
Conf b (2 unstable [all])
Conf xx (3 unstable [all])" apt install -s xx -qq


msgmsg "Test that the Recommends in x does not influence the Depends in xx (one level lower)"
testsuccessequal "The following additional packages will be installed:
  a b xx
The following NEW packages will be installed:
  a b x xx
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Inst a (2 unstable [all])
Inst b (2 unstable [all])
Inst xx (3 unstable [all])
Inst x (3 unstable [all])
Conf a (2 unstable [all])
Conf b (2 unstable [all])
Conf xx (3 unstable [all])
Conf x (3 unstable [all])" apt install -s x -qq