use 'best' hash for source authentication
[ntk/apt.git] / test / integration / test-prefer-higher-priority-providers
CommitLineData
69335858
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
7configarchitecture 'native'
8
9insertpackage 'unstable' 'foo' 'all' '1' 'Provides: stuff' 'important'
10insertpackage 'unstable' 'bar' 'all' '1' 'Provides: stuff' 'optional'
11insertpackage 'unstable' 'baz' 'all' '1' 'Provides: stuff' 'extra'
12insertpackage 'unstable' 'awesome' 'all' '1' 'Depends: stuff'
13
14setupaptarchive
15
16testequal 'Reading package lists...
17Building dependency tree...
18The following extra packages will be installed:
19 foo
20The following NEW packages will be installed:
21 awesome foo
220 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
23Inst foo (1 unstable [all])
24Inst awesome (1 unstable [all])
25Conf foo (1 unstable [all])
26Conf awesome (1 unstable [all])' aptget install awesome -s
27
28testequal 'Reading package lists...
29Building dependency tree...
30The following NEW packages will be installed:
31 awesome foo
320 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
33Inst foo (1 unstable [all])
34Inst awesome (1 unstable [all])
35Conf foo (1 unstable [all])
36Conf awesome (1 unstable [all])' aptget install awesome foo -s
66706285
DK
37
38testequal "Reading package lists...
39Building dependency tree...
40Package 'bar' is not installed, so not removed
41Package 'baz' is not installed, so not removed
42The following extra packages will be installed:
43 foo
44The following NEW packages will be installed:
45 awesome foo
460 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
47Inst foo (1 unstable [all])
48Inst awesome (1 unstable [all])
49Conf foo (1 unstable [all])
50Conf awesome (1 unstable [all])" aptget install awesome bar- baz- -s
51
52testequal "Reading package lists...
53Building dependency tree...
54Package 'foo' is not installed, so not removed
55The following extra packages will be installed:
56 bar
57The following NEW packages will be installed:
58 awesome bar
590 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
60Inst bar (1 unstable [all])
61Inst awesome (1 unstable [all])
62Conf bar (1 unstable [all])
63Conf awesome (1 unstable [all])" aptget install awesome foo- -s
64
65testequal "Reading package lists...
66Building dependency tree...
67Package 'foo' is not installed, so not removed
68Package 'baz' is not installed, so not removed
69The following extra packages will be installed:
70 bar
71The following NEW packages will be installed:
72 awesome bar
730 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
74Inst bar (1 unstable [all])
75Inst awesome (1 unstable [all])
76Conf bar (1 unstable [all])
77Conf awesome (1 unstable [all])" aptget install awesome foo- baz- -s
78
79testequal "Reading package lists...
80Building dependency tree...
81Package 'foo' is not installed, so not removed
82Package 'bar' is not installed, so not removed
83The following extra packages will be installed:
84 baz
85The following NEW packages will be installed:
86 awesome baz
870 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
88Inst baz (1 unstable [all])
89Inst awesome (1 unstable [all])
90Conf baz (1 unstable [all])
91Conf awesome (1 unstable [all])" aptget install awesome foo- bar- -s
92
93testequal "Reading package lists...
94Building dependency tree...
95Package 'foo' is not installed, so not removed
96Package 'bar' is not installed, so not removed
97Package 'baz' is not installed, so not removed
98Some packages could not be installed. This may mean that you have
99requested an impossible situation or if you are using the unstable
100distribution that some required packages have not yet been created
101or been moved out of Incoming.
102The following information may help to resolve the situation:
103
104The following packages have unmet dependencies:
105 awesome : Depends: stuff
106E: Unable to correct problems, you have held broken packages." aptget install awesome foo- bar- baz- -s