]>
Commit | Line | Data |
---|---|---|
2b5c35c7 DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | setupenvironment | |
7 | configarchitecture 'amd64' 'i386' 'armel' | |
8 | ||
9 | insertpackage 'unstable' 'cool-foo' 'amd64,i386' '1.0' 'Depends: foo' | |
596ec43c DK |
10 | insertpackage 'unstable' 'cool-foo-x64' 'amd64' '1.0' 'Depends: foo:amd64' |
11 | insertpackage 'unstable' 'cool-foo-x32' 'amd64' '1.0' 'Depends: foo:i386' | |
2b5c35c7 DK |
12 | insertpackage 'unstable' 'foo' 'amd64,i386,armel' '1.0' 'Multi-Arch: foreign' |
13 | ||
14 | insertpackage 'unstable' 'cool-bar' 'amd64,i386' '1.0' 'Depends: bar-provider' | |
596ec43c DK |
15 | insertpackage 'unstable' 'cool-bar-x64' 'amd64' '1.0' 'Depends: bar-provider:amd64' |
16 | insertpackage 'unstable' 'cool-bar-x32' 'amd64' '1.0' 'Depends: bar-provider:i386' | |
2b5c35c7 DK |
17 | insertpackage 'unstable' 'bar' 'amd64,i386,armel' '1.0' 'Provides: bar-provider |
18 | Multi-Arch: foreign' | |
19 | ||
20 | setupaptarchive | |
21 | ||
25b86db1 | 22 | testsuccessequal 'Reading package lists... |
2b5c35c7 DK |
23 | Building dependency tree... |
24 | The following extra packages will be installed: | |
25 | foo | |
26 | The following NEW packages will be installed: | |
27 | cool-foo:i386 foo | |
28 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
29 | Inst foo (1.0 unstable [amd64]) | |
30 | Inst cool-foo:i386 (1.0 unstable [i386]) | |
31 | Conf foo (1.0 unstable [amd64]) | |
32 | Conf cool-foo:i386 (1.0 unstable [i386])' aptget install cool-foo:i386 -s | |
33 | ||
25b86db1 | 34 | testsuccessequal 'Reading package lists... |
2b5c35c7 DK |
35 | Building dependency tree... |
36 | The following NEW packages will be installed: | |
37 | cool-foo foo:i386 | |
38 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
39 | Inst foo:i386 (1.0 unstable [i386]) | |
40 | Inst cool-foo (1.0 unstable [amd64]) | |
41 | Conf foo:i386 (1.0 unstable [i386]) | |
42 | Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:i386 -s | |
43 | ||
25b86db1 | 44 | testsuccessequal 'Reading package lists... |
2b5c35c7 DK |
45 | Building dependency tree... |
46 | The following NEW packages will be installed: | |
47 | cool-foo foo:armel | |
48 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
49 | Inst foo:armel (1.0 unstable [armel]) | |
50 | Inst cool-foo (1.0 unstable [amd64]) | |
51 | Conf foo:armel (1.0 unstable [armel]) | |
52 | Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:armel -s | |
53 | ||
25b86db1 | 54 | testsuccessequal 'Reading package lists... |
2b5c35c7 DK |
55 | Building dependency tree... |
56 | The following extra packages will be installed: | |
57 | bar | |
58 | The following NEW packages will be installed: | |
59 | bar cool-bar:i386 | |
60 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
61 | Inst bar (1.0 unstable [amd64]) | |
62 | Inst cool-bar:i386 (1.0 unstable [i386]) | |
63 | Conf bar (1.0 unstable [amd64]) | |
64 | Conf cool-bar:i386 (1.0 unstable [i386])' aptget install cool-bar:i386 -s | |
65 | ||
25b86db1 | 66 | testsuccessequal 'Reading package lists... |
2b5c35c7 | 67 | Building dependency tree... |
596ec43c DK |
68 | The following NEW packages will be installed: |
69 | bar:i386 cool-bar | |
70 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
71 | Inst bar:i386 (1.0 unstable [i386]) | |
72 | Inst cool-bar (1.0 unstable [amd64]) | |
73 | Conf bar:i386 (1.0 unstable [i386]) | |
74 | Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:i386 -s | |
75 | ||
05f64ca2 | 76 | testsuccessequal 'Reading package lists... |
596ec43c DK |
77 | Building dependency tree... |
78 | The following NEW packages will be installed: | |
79 | bar:armel cool-bar | |
80 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
81 | Inst bar:armel (1.0 unstable [armel]) | |
82 | Inst cool-bar (1.0 unstable [amd64]) | |
83 | Conf bar:armel (1.0 unstable [armel]) | |
84 | Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:armel -s | |
85 | ||
05f64ca2 | 86 | testsuccessequal "Reading package lists... |
596ec43c DK |
87 | Building dependency tree... |
88 | Note, selecting 'bar:i386' instead of 'bar-provider:i386' | |
89 | The following NEW packages will be installed: | |
90 | bar:i386 cool-bar | |
91 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
92 | Inst bar:i386 (1.0 unstable [i386]) | |
93 | Inst cool-bar (1.0 unstable [amd64]) | |
94 | Conf bar:i386 (1.0 unstable [i386]) | |
95 | Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider:i386 -s -q=0 | |
96 | ||
97 | satisfiable_in_singlearch() { | |
05f64ca2 | 98 | testsuccessequal 'Reading package lists... |
596ec43c DK |
99 | Building dependency tree... |
100 | The following extra packages will be installed: | |
101 | foo | |
102 | The following NEW packages will be installed: | |
103 | cool-foo foo | |
104 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
105 | Inst foo (1.0 unstable [amd64]) | |
106 | Inst cool-foo (1.0 unstable [amd64]) | |
107 | Conf foo (1.0 unstable [amd64]) | |
108 | Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 -s | |
109 | ||
05f64ca2 | 110 | testsuccessequal 'Reading package lists... |
596ec43c DK |
111 | Building dependency tree... |
112 | The following NEW packages will be installed: | |
113 | cool-foo foo | |
114 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
115 | Inst foo (1.0 unstable [amd64]) | |
116 | Inst cool-foo (1.0 unstable [amd64]) | |
117 | Conf foo (1.0 unstable [amd64]) | |
118 | Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:amd64 -s | |
119 | ||
05f64ca2 | 120 | testsuccessequal 'Reading package lists... |
596ec43c | 121 | Building dependency tree... |
2b5c35c7 DK |
122 | The following extra packages will be installed: |
123 | bar | |
124 | The following NEW packages will be installed: | |
125 | bar cool-bar | |
126 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
127 | Inst bar (1.0 unstable [amd64]) | |
128 | Inst cool-bar (1.0 unstable [amd64]) | |
129 | Conf bar (1.0 unstable [amd64]) | |
130 | Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 -s | |
131 | ||
05f64ca2 | 132 | testsuccessequal 'Reading package lists... |
2b5c35c7 DK |
133 | Building dependency tree... |
134 | The following NEW packages will be installed: | |
135 | bar cool-bar | |
136 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
137 | Inst bar (1.0 unstable [amd64]) | |
138 | Inst cool-bar (1.0 unstable [amd64]) | |
139 | Conf bar (1.0 unstable [amd64]) | |
140 | Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:amd64 -s | |
141 | ||
05f64ca2 | 142 | testsuccessequal "Reading package lists... |
2b5c35c7 | 143 | Building dependency tree... |
596ec43c | 144 | Note, selecting 'bar' instead of 'bar-provider' |
2b5c35c7 | 145 | The following NEW packages will be installed: |
596ec43c | 146 | bar cool-bar |
2b5c35c7 | 147 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. |
596ec43c | 148 | Inst bar (1.0 unstable [amd64]) |
2b5c35c7 | 149 | Inst cool-bar (1.0 unstable [amd64]) |
596ec43c DK |
150 | Conf bar (1.0 unstable [amd64]) |
151 | Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider -s -q=0 | |
2b5c35c7 | 152 | |
05f64ca2 | 153 | testsuccessequal 'Reading package lists... |
2b5c35c7 | 154 | Building dependency tree... |
596ec43c DK |
155 | The following extra packages will be installed: |
156 | foo | |
2b5c35c7 | 157 | The following NEW packages will be installed: |
596ec43c | 158 | cool-foo-x64 foo |
2b5c35c7 | 159 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. |
596ec43c DK |
160 | Inst foo (1.0 unstable [amd64]) |
161 | Inst cool-foo-x64 (1.0 unstable [amd64]) | |
162 | Conf foo (1.0 unstable [amd64]) | |
163 | Conf cool-foo-x64 (1.0 unstable [amd64])' aptget install cool-foo-x64 -s | |
164 | } | |
286afa36 | 165 | |
596ec43c | 166 | #FIXME: do not work in single-arch as i386 isn't known at cache generation time |
05f64ca2 | 167 | testsuccessequal 'Reading package lists... |
286afa36 | 168 | Building dependency tree... |
596ec43c DK |
169 | The following extra packages will be installed: |
170 | foo | |
286afa36 | 171 | The following NEW packages will be installed: |
596ec43c DK |
172 | cool-foo-x32 foo |
173 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
174 | Inst foo (1.0 unstable [amd64]) | |
175 | Inst cool-foo-x32 (1.0 unstable [amd64]) | |
176 | Conf foo (1.0 unstable [amd64]) | |
177 | Conf cool-foo-x32 (1.0 unstable [amd64])' aptget install cool-foo-x32 -s | |
178 | ||
05f64ca2 | 179 | testsuccessequal 'Reading package lists... |
596ec43c DK |
180 | Building dependency tree... |
181 | The following extra packages will be installed: | |
182 | bar | |
183 | The following NEW packages will be installed: | |
184 | bar cool-bar-x32 | |
286afa36 DK |
185 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. |
186 | Inst bar (1.0 unstable [amd64]) | |
596ec43c | 187 | Inst cool-bar-x32 (1.0 unstable [amd64]) |
286afa36 | 188 | Conf bar (1.0 unstable [amd64]) |
596ec43c | 189 | Conf cool-bar-x32 (1.0 unstable [amd64])' aptget install cool-bar-x32 -s -q=0 |
286afa36 | 190 | |
05f64ca2 | 191 | testsuccessequal 'Reading package lists... |
286afa36 | 192 | Building dependency tree... |
596ec43c DK |
193 | The following extra packages will be installed: |
194 | bar | |
286afa36 | 195 | The following NEW packages will be installed: |
596ec43c | 196 | bar cool-bar-x64 |
286afa36 | 197 | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. |
596ec43c DK |
198 | Inst bar (1.0 unstable [amd64]) |
199 | Inst cool-bar-x64 (1.0 unstable [amd64]) | |
200 | Conf bar (1.0 unstable [amd64]) | |
201 | Conf cool-bar-x64 (1.0 unstable [amd64])' aptget install cool-bar-x64 -s -q=0 | |
202 | ||
203 | ||
204 | satisfiable_in_singlearch | |
205 | ||
206 | msgmsg 'switch to single architecture' | |
207 | configarchitecture 'amd64' | |
208 | ||
209 | satisfiable_in_singlearch |