Root/qpkg/test/conflict

Source at commit b89bcdfd93a60417649340a18ca3bb573b1d9691 created 9 years 16 days ago.
By Werner Almesberger, qpkg: also consider conflicts introduced by package about to be added
1#!/bin/sh
2. ./Common
3
4###############################################################################
5
6qpkg_fail "direct conflict precludes resolution" prereq A <<EOF
7Package: B
8Version: 0
9Architecture: test
10Filename: B
11
12Package: A
13Version: 0
14Architecture: test
15Depends: B
16Conflicts: B
17Filename: A
18EOF
19expect <<EOF
20can't resolve A
21EOF
22
23###############################################################################
24
25qpkg_fail "indirect conflict precludes resolution" prereq A <<EOF
26Package: C
27Version: 0
28Architecture: test
29Filename: C
30
31Package: B
32Version: 0
33Architecture: test
34Depends: C
35Filename: B
36
37Package: A
38Version: 0
39Architecture: test
40Depends: B
41Conflicts: C
42Filename: A
43EOF
44expect <<EOF
45can't resolve A
46EOF
47
48###############################################################################
49
50qpkg_fail "aggregation of conflicts" prereq A <<EOF
51Package: C
52Version: 0
53Architecture: test
54Filename: C
55
56Package: B
57Version: 0
58Architecture: test
59Depends: C
60Conflicts: C
61Filename: B
62
63Package: A
64Version: 0
65Architecture: test
66Depends: B
67Filename: A
68EOF
69expect <<EOF
70can't resolve A
71EOF
72
73###############################################################################
74
75qpkg_fail "conflicts honor version (match)" prereq A <<EOF
76Package: B
77Version: 1
78Architecture: test
79Filename: B
80
81Package: A
82Version: 0
83Architecture: test
84Depends: B
85Conflicts: B (= 1)
86Filename: A
87EOF
88expect <<EOF
89can't resolve A
90EOF
91
92###############################################################################
93
94qpkg "conflicts honor version (mismatch)" prereq A <<EOF
95Package: B
96Version: 1
97Architecture: test
98Filename: B
99
100Package: A
101Version: 0
102Architecture: test
103Depends: B
104Conflicts: B (= 0)
105Filename: A
106EOF
107expect <<EOF
108B
109EOF
110
111###############################################################################
112
113qpkg "conflict trumps preference (1)" prereq foo <<EOF
114Package: bar
115Version: 0
116Architecture: test
117Filename: bar_0
118
119Package: bar
120Version: 1
121Architecture: test
122Filename: bar_1
123
124Package: foo
125Version: 0
126Architecture: test
127Depends: bar
128Conflicts: bar (>= 1)
129Filename: foo
130EOF
131expect <<EOF
132bar_0
133EOF
134
135###############################################################################
136
137qpkg "conflict trumps preference (2)" prereq foo <<EOF
138Package: bar
139Version: 1
140Architecture: test
141Filename: bar_1
142
143Package: bar
144Version: 0
145Architecture: test
146Filename: bar_0
147
148Package: foo
149Version: 0
150Architecture: test
151Depends: bar
152Conflicts: bar (>= 1)
153Filename: foo
154EOF
155expect <<EOF
156bar_0
157EOF
158
159###############################################################################
160
161qpkg_fail "prerequisite conflicts with dependant" prereq A <<EOF
162Package: B
163Version: 0
164Architecture: test
165Conflicts: A
166Filename: B
167
168Package: A
169Version: 0
170Architecture: test
171Depends: B
172Filename: A
173EOF
174expect <<EOF
175can't resolve A
176EOF
177
178###############################################################################
179
180qpkg_fail "prerequisite conflicts with considered package (1)" prereq A <<EOF
181Package: B
182Version: 0
183Architecture: test
184Conflicts: C
185Filename: B
186
187Package: C
188Version: 0
189Architecture: test
190Filename: C
191
192Package: A
193Version: 0
194Architecture: test
195Depends: B, C
196Filename: A
197EOF
198expect <<EOF
199can't resolve A
200EOF
201
202###############################################################################
203
204qpkg_fail "prerequisite conflicts with considered package (1)" prereq A <<EOF
205Package: B
206Version: 0
207Architecture: test
208Filename: B
209
210Package: C
211Version: 0
212Architecture: test
213Conflicts: B
214Filename: C
215
216Package: A
217Version: 0
218Architecture: test
219Depends: B, C
220Filename: A
221EOF
222expect <<EOF
223can't resolve A
224EOF
225

Archive Download this file

Branches:
master



interactive