]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-get-install-virtual-pkgs
improve SOCKS error messages for http slightly
[apt.git] / test / integration / test-apt-get-install-virtual-pkgs
CommitLineData
3addaba1
DK
1#!/bin/sh
2set -e
3
3abb6a6a
DK
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
3addaba1
DK
6setupenvironment
7configarchitecture 'amd64' 'i386'
8
9insertpackage 'unstable' 'foo' 'amd64' '1' 'Provides: foo-prv'
10
11insertpackage 'unstable' 'baz1' 'amd64' '1' 'Provides: foo-prv1'
12insertpackage 'unstable' 'foo1' 'amd64' '1' 'Provides: foo-prv1'
13
14insertpackage 'unstable' 'baz2' 'amd64' '1' 'Provides: foo-prv2'
15insertpackage 'unstable' 'foo2' 'amd64' '2' 'Provides: foo-prv2:amd64'
16
17insertpackage 'unstable' 'baz3' 'amd64' '1' 'Provides: foo-prv3'
18insertpackage 'unstable' 'foo3' 'i386' '2' 'Provides: foo-prv3:amd64'
19
20insertpackage 'unstable' 'baz4' 'amd64' '1' 'Provides: foo-prv4:amd64'
21insertpackage 'unstable' 'foo4' 'i386' '2' 'Provides: foo-prv4:amd64'
22
23insertpackage 'experimental' 'baz5' 'amd64' '1' 'Provides: foo-prv5:amd64'
24insertpackage 'experimental' 'foo5' 'i386' '2' 'Provides: foo-prv5:amd64'
25
26setupaptarchive
27
28testsuccessequal "Reading package lists...
29Building dependency tree...
30Note, selecting 'foo' instead of 'foo-prv'
31The following NEW packages will be installed:
32 foo
330 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
34Inst foo (1 unstable [amd64])
87d6947d 35Conf foo (1 unstable [amd64])" aptget install foo-prv -s
3addaba1
DK
36
37testvirtuals() {
38 testfailureequal "Reading package lists...
39Building dependency tree...
40Package $1 is a virtual package provided by:
41 $3
42 $2
43You should explicitly select one to install.
44
87d6947d 45E: Package '$1' has no installation candidate" aptget install $1 -s
3addaba1
DK
46}
47
48testvirtuals 'foo-prv1' 'baz1 1' 'foo1 1'
49testvirtuals 'foo-prv2' 'baz2 1' 'foo2 2'
50testvirtuals 'foo-prv3' 'baz3 1' 'foo3:i386 2'
51testvirtuals 'foo-prv4' 'baz4 1' 'foo4:i386 2'
52testvirtuals 'foo-prv5' 'baz5 1' 'foo5:i386 2'
53
54echo 'Package: *
55Pin: release a=experimental
56Pin-Priority: -1' > rootdir/etc/apt/preferences.d/experimental.pref
57
58testfailureequal "Reading package lists...
59Building dependency tree...
60Package foo-prv5 is a virtual package provided by:
61 foo5:i386 2 [Not candidate version]
62 baz5 1 [Not candidate version]
63
87d6947d 64E: Package 'foo-prv5' has no installation candidate" aptget install foo-prv5 -s