* apt-pkg/cachefilter.cc:
[ntk/apt.git] / test / integration / test-architecture-specification-parsing
CommitLineData
01f520ce
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
5f20ac7f 7configarchitecture 'amd64' 'armel'
01f520ce
DK
8
9buildsimplenativepackage 'pkg-arch-foo' 'amd64' '1.0' 'stable' 'Build-Depends: foo [amd64 !amd64]
10Depends: foo [amd64 !amd64]'
11buildsimplenativepackage 'pkg-arch-no-foo' 'amd64' '1.0' 'stable' 'Build-Depends: foo [!amd64 amd64]
12Depends: foo [!amd64 amd64]'
13buildsimplenativepackage 'pkg-arch-foo-unrelated-no' 'amd64' '1.0' 'stable' 'Build-Depends: foo [!kfreebsd-any amd64]
14Depends: foo [!kfreebsd-any amd64]'
15buildsimplenativepackage 'pkg-arch-foo-unrelated-no2' 'amd64' '1.0' 'stable' 'Build-Depends: foo [amd64 !kfreebsd-any]
16Depends: foo [amd64 !kfreebsd-any]'
5f20ac7f
DK
17buildsimplenativepackage 'no-depends' 'armel' '1.0' 'stable' 'Build-Depends: foo [armhf], bar [arm]
18Depends: foo [armhf], bar [arm]'
01f520ce
DK
19
20buildsimplenativepackage 'foo' 'amd64' '1.0' 'stable'
21
22insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign'
23
24setupaptarchive
25
26testequal 'Reading package lists...
27Building dependency tree...
28The following extra packages will be installed:
29 foo
30The following NEW packages will be installed:
31 foo pkg-arch-foo
320 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
33Inst foo (1.0 stable [amd64])
34Inst pkg-arch-foo (1.0 stable [amd64])
35Conf foo (1.0 stable [amd64])
36Conf pkg-arch-foo (1.0 stable [amd64])' aptget install pkg-arch-foo -s
37
38testequal 'Reading package lists...
39Building dependency tree...
40The following NEW packages will be installed:
41 pkg-arch-no-foo
420 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
43Inst pkg-arch-no-foo (1.0 stable [amd64])
44Conf pkg-arch-no-foo (1.0 stable [amd64])' aptget install pkg-arch-no-foo -s
45
46testequal 'Reading package lists...
47Building dependency tree...
48The following extra packages will be installed:
49 foo
50The following NEW packages will be installed:
51 foo pkg-arch-foo-unrelated-no
520 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
53Inst foo (1.0 stable [amd64])
54Inst pkg-arch-foo-unrelated-no (1.0 stable [amd64])
55Conf foo (1.0 stable [amd64])
56Conf pkg-arch-foo-unrelated-no (1.0 stable [amd64])' aptget install pkg-arch-foo-unrelated-no -s
57
58testequal 'Reading package lists...
59Building dependency tree...
60The following extra packages will be installed:
61 foo
62The following NEW packages will be installed:
63 foo pkg-arch-foo-unrelated-no2
640 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
65Inst foo (1.0 stable [amd64])
66Inst pkg-arch-foo-unrelated-no2 (1.0 stable [amd64])
67Conf foo (1.0 stable [amd64])
68Conf pkg-arch-foo-unrelated-no2 (1.0 stable [amd64])' aptget install pkg-arch-foo-unrelated-no2 -s
69
70testequal 'Reading package lists...
71Building dependency tree...
72The following NEW packages will be installed:
73 foo
740 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
75Inst foo (1.0 stable [amd64])
76Conf foo (1.0 stable [amd64])' aptget build-dep pkg-arch-foo -s
77
78testequal 'Reading package lists...
79Building dependency tree...
800 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep pkg-arch-no-foo -s
81
82testequal 'Reading package lists...
83Building dependency tree...
84The following NEW packages will be installed:
85 foo
860 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
87Inst foo (1.0 stable [amd64])
88Conf foo (1.0 stable [amd64])' aptget build-dep pkg-arch-foo-unrelated-no -s
89
90testequal 'Reading package lists...
91Building dependency tree...
92The following NEW packages will be installed:
93 foo
940 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
95Inst foo (1.0 stable [amd64])
96Conf foo (1.0 stable [amd64])' aptget build-dep pkg-arch-foo-unrelated-no2 -s
97
5f20ac7f
DK
98testequal 'Reading package lists...
99Building dependency tree...
1000 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep no-depends -s
01f520ce 101
5f20ac7f
DK
102# this is not really testing APT - more that dpkg is in line with us
103testequal 'Reading package lists...
104Building dependency tree...
105The following NEW packages will be installed:
106 no-depends:armel
1070 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
108Inst no-depends:armel (1.0 stable [armel])
109Conf no-depends:armel (1.0 stable [armel])' aptget install no-depends -s