]>
Commit | Line | Data |
---|---|---|
01f520ce DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | setupenvironment | |
01f520ce | 7 | |
a7250ed0 DK |
8 | # we need this construct here as it isn't really possible to fake native arch for dpkg-* tools |
9 | NATIVE="$(command dpkg --print-architecture)" | |
10 | configarchitecture "${NATIVE}" 'armel' | |
11 | ||
12 | buildsimplenativepackage 'pkg-arch-foo' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [${NATIVE} !${NATIVE}] | |
13 | Depends: foo [${NATIVE} !${NATIVE}]" | |
14 | buildsimplenativepackage 'pkg-arch-no-foo' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [!${NATIVE} ${NATIVE}] | |
15 | Depends: foo [!${NATIVE} ${NATIVE}]" | |
16 | buildsimplenativepackage 'pkg-arch-foo-unrelated-no' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [!kfreebsd-any ${NATIVE}] | |
17 | Depends: foo [!kfreebsd-any ${NATIVE}]" | |
18 | buildsimplenativepackage 'pkg-arch-foo-unrelated-no2' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [${NATIVE} !kfreebsd-any] | |
19 | Depends: foo [${NATIVE} !kfreebsd-any]" | |
20 | buildsimplenativepackage 'no-depends' 'armel' '1.0' 'stable' 'Build-Depends: foo [armeb], bar [arm] | |
21 | Depends: foo [armeb], bar [arm]' | |
01f520ce | 22 | |
a7250ed0 | 23 | buildsimplenativepackage 'foo' "$NATIVE" '1.0' 'stable' |
01f520ce DK |
24 | |
25 | insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign' | |
26 | ||
27 | setupaptarchive | |
28 | ||
a7250ed0 | 29 | testequal "Reading package lists... |
01f520ce DK |
30 | Building dependency tree... |
31 | The following extra packages will be installed: | |
32 | foo | |
33 | The following NEW packages will be installed: | |
34 | foo pkg-arch-foo | |
35 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
a7250ed0 DK |
36 | Inst foo (1.0 stable [${NATIVE}]) |
37 | Inst pkg-arch-foo (1.0 stable [${NATIVE}]) | |
38 | Conf foo (1.0 stable [${NATIVE}]) | |
39 | Conf pkg-arch-foo (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo -s | |
01f520ce | 40 | |
a7250ed0 | 41 | testequal "Reading package lists... |
01f520ce DK |
42 | Building dependency tree... |
43 | The following NEW packages will be installed: | |
44 | pkg-arch-no-foo | |
45 | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
a7250ed0 DK |
46 | Inst pkg-arch-no-foo (1.0 stable [${NATIVE}]) |
47 | Conf pkg-arch-no-foo (1.0 stable [${NATIVE}])" aptget install pkg-arch-no-foo -s | |
01f520ce | 48 | |
a7250ed0 | 49 | testequal "Reading package lists... |
01f520ce DK |
50 | Building dependency tree... |
51 | The following extra packages will be installed: | |
52 | foo | |
53 | The following NEW packages will be installed: | |
54 | foo pkg-arch-foo-unrelated-no | |
55 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
a7250ed0 DK |
56 | Inst foo (1.0 stable [${NATIVE}]) |
57 | Inst pkg-arch-foo-unrelated-no (1.0 stable [${NATIVE}]) | |
58 | Conf foo (1.0 stable [${NATIVE}]) | |
59 | Conf pkg-arch-foo-unrelated-no (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo-unrelated-no -s | |
01f520ce | 60 | |
a7250ed0 | 61 | testequal "Reading package lists... |
01f520ce DK |
62 | Building dependency tree... |
63 | The following extra packages will be installed: | |
64 | foo | |
65 | The following NEW packages will be installed: | |
66 | foo pkg-arch-foo-unrelated-no2 | |
67 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
a7250ed0 DK |
68 | Inst foo (1.0 stable [${NATIVE}]) |
69 | Inst pkg-arch-foo-unrelated-no2 (1.0 stable [${NATIVE}]) | |
70 | Conf foo (1.0 stable [${NATIVE}]) | |
71 | Conf pkg-arch-foo-unrelated-no2 (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo-unrelated-no2 -s | |
01f520ce | 72 | |
a7250ed0 | 73 | testequal "Reading package lists... |
01f520ce DK |
74 | Building dependency tree... |
75 | The following NEW packages will be installed: | |
76 | foo | |
77 | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
a7250ed0 DK |
78 | Inst foo (1.0 stable [${NATIVE}]) |
79 | Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo -s | |
01f520ce DK |
80 | |
81 | testequal 'Reading package lists... | |
82 | Building dependency tree... | |
83 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep pkg-arch-no-foo -s | |
84 | ||
a7250ed0 | 85 | testequal "Reading package lists... |
01f520ce DK |
86 | Building dependency tree... |
87 | The following NEW packages will be installed: | |
88 | foo | |
89 | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
a7250ed0 DK |
90 | Inst foo (1.0 stable [${NATIVE}]) |
91 | Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no -s | |
01f520ce | 92 | |
a7250ed0 | 93 | testequal "Reading package lists... |
01f520ce DK |
94 | Building dependency tree... |
95 | The following NEW packages will be installed: | |
96 | foo | |
97 | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
a7250ed0 DK |
98 | Inst foo (1.0 stable [${NATIVE}]) |
99 | Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no2 -s | |
01f520ce | 100 | |
5f20ac7f DK |
101 | testequal 'Reading package lists... |
102 | Building dependency tree... | |
103 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep no-depends -s | |
01f520ce | 104 | |
5f20ac7f | 105 | # this is not really testing APT - more that dpkg is in line with us |
a7250ed0 | 106 | configarchitecture 'amd64' 'armel' |
5f20ac7f DK |
107 | testequal 'Reading package lists... |
108 | Building dependency tree... | |
109 | The following NEW packages will be installed: | |
110 | no-depends:armel | |
111 | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
112 | Inst no-depends:armel (1.0 stable [armel]) | |
113 | Conf no-depends:armel (1.0 stable [armel])' aptget install no-depends -s |