]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-architecture-specification-parsing
test: Always install dpkg into our tests, regardless of MA
[apt.git] / test / integration / test-architecture-specification-parsing
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6setupenvironment
7
8# we need this construct here as it isn't really possible to fake native arch for dpkg-* tools
9NATIVE="$(command dpkg --print-architecture)"
10configarchitecture "${NATIVE}" 'armel'
11
12buildsimplenativepackage 'pkg-arch-foo' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [${NATIVE} !${NATIVE}]
13Depends: foo [${NATIVE} !${NATIVE}]"
14buildsimplenativepackage 'pkg-arch-no-foo' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [!${NATIVE} ${NATIVE}]
15Depends: foo [!${NATIVE} ${NATIVE}]"
16buildsimplenativepackage 'pkg-arch-foo-unrelated-no' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [!someos-any ${NATIVE}]
17Depends: foo [!someos-any ${NATIVE}]"
18buildsimplenativepackage 'pkg-arch-foo-unrelated-no2' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [${NATIVE} !someos-any]
19Depends: foo [${NATIVE} !someos-any]"
20buildsimplenativepackage 'no-depends' 'armel' '1.0' 'stable' 'Build-Depends: foo [armeb], bar [arm]
21Depends: foo [armeb], bar [arm]'
22
23buildsimplenativepackage 'foo' "$NATIVE" '1.0' 'stable'
24
25insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign'
26
27setupaptarchive
28
29testsuccessequal "Reading package lists...
30Building dependency tree...
31The following additional packages will be installed:
32 foo
33The following NEW packages will be installed:
34 foo pkg-arch-foo
350 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
36Inst foo (1.0 stable [${NATIVE}])
37Inst pkg-arch-foo (1.0 stable [${NATIVE}])
38Conf foo (1.0 stable [${NATIVE}])
39Conf pkg-arch-foo (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo -s
40
41testsuccessequal "Reading package lists...
42Building dependency tree...
43The following NEW packages will be installed:
44 pkg-arch-no-foo
450 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
46Inst pkg-arch-no-foo (1.0 stable [${NATIVE}])
47Conf pkg-arch-no-foo (1.0 stable [${NATIVE}])" aptget install pkg-arch-no-foo -s
48
49testsuccessequal "Reading package lists...
50Building dependency tree...
51The following additional packages will be installed:
52 foo
53The following NEW packages will be installed:
54 foo pkg-arch-foo-unrelated-no
550 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
56Inst foo (1.0 stable [${NATIVE}])
57Inst pkg-arch-foo-unrelated-no (1.0 stable [${NATIVE}])
58Conf foo (1.0 stable [${NATIVE}])
59Conf pkg-arch-foo-unrelated-no (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo-unrelated-no -s
60
61testsuccessequal "Reading package lists...
62Building dependency tree...
63The following additional packages will be installed:
64 foo
65The following NEW packages will be installed:
66 foo pkg-arch-foo-unrelated-no2
670 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
68Inst foo (1.0 stable [${NATIVE}])
69Inst pkg-arch-foo-unrelated-no2 (1.0 stable [${NATIVE}])
70Conf foo (1.0 stable [${NATIVE}])
71Conf pkg-arch-foo-unrelated-no2 (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo-unrelated-no2 -s
72
73testsuccessequal "Reading package lists...
74Reading package lists...
75Building dependency tree...
76The following NEW packages will be installed:
77 foo
780 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
79Inst foo (1.0 stable [${NATIVE}])
80Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo -s
81
82testsuccessequal 'Reading package lists...
83pkg-arch-no-foo has no build depends.
84Reading package lists...
85Building dependency tree...
860 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep pkg-arch-no-foo -s
87
88testsuccessequal "Reading package lists...
89Reading package lists...
90Building dependency tree...
91The following NEW packages will be installed:
92 foo
930 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
94Inst foo (1.0 stable [${NATIVE}])
95Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no -s
96
97testsuccessequal "Reading package lists...
98Reading package lists...
99Building dependency tree...
100The following NEW packages will be installed:
101 foo
1020 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
103Inst foo (1.0 stable [${NATIVE}])
104Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no2 -s
105
106testsuccessequal 'Reading package lists...
107no-depends has no build depends.
108Reading package lists...
109Building dependency tree...
1100 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep no-depends -s
111
112# this is not really testing APT - more that dpkg is in line with us
113configarchitecture 'amd64' 'armel'
114testsuccessequal 'Reading package lists...
115Building dependency tree...
116The following NEW packages will be installed:
117 no-depends:armel
1180 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
119Inst no-depends:armel (1.0 stable [armel])
120Conf no-depends:armel (1.0 stable [armel])' aptget install no-depends -s