2 pkg-provides pkg-provides-10 pkg-provides-20 pkg-provides-10-20 \
3 pkg-depends pkg-depends-eq pkg-depends-le pkg-depends-ge \
4 pkg-predepends pkg-predepends-eq pkg-predepends-le pkg-predepends-ge \
5 pkg-breaks pkg-breaks-eq pkg-breaks-le pkg-breaks-ge \
6 pkg-conflicts pkg-conflicts-eq pkg-conflicts-le pkg-conflicts-ge \
7 pkg-a-depends-ge-lt pkg-b-provides-10 pkg-c-provides-20
12 $(DPKG_PURGE
) pkg-depends
13 $(DPKG_PURGE
) pkg-depends-le
14 $(DPKG_PURGE
) pkg-depends-eq
15 $(DPKG_PURGE
) pkg-depends-ge
19 # The provided dependency is not present, fail
20 ! $(DPKG_INSTALL
) pkg-depends.deb
21 ! $(DPKG_INSTALL
) pkg-depends-eq.deb
22 ! $(DPKG_INSTALL
) pkg-depends-le.deb
23 ! $(DPKG_INSTALL
) pkg-depends-ge.deb
25 # Install the providing package (versionless)
26 $(DPKG_INSTALL
) pkg-provides.deb
27 $(DPKG_INSTALL
) pkg-depends.deb
28 ! $(DPKG_INSTALL
) pkg-depends-eq.deb
29 ! $(DPKG_INSTALL
) pkg-depends-le.deb
30 ! $(DPKG_INSTALL
) pkg-depends-ge.deb
31 # Upgrade the providing package (versionless)
32 $(DPKG_INSTALL
) pkg-provides.deb
33 ! $(DPKG_PURGE
) pkg-provides
37 # Install the providing package (pkg-virtual 10)
38 $(DPKG_INSTALL
) pkg-provides-10.deb
39 $(DPKG_INSTALL
) pkg-depends.deb
40 $(DPKG_INSTALL
) pkg-depends-le.deb
41 ! $(DPKG_INSTALL
) pkg-depends-eq.deb
42 ! $(DPKG_INSTALL
) pkg-depends-ge.deb
43 # Upgrade the providing package (pkg-virtual 10)
44 $(DPKG_INSTALL
) pkg-provides-10.deb
48 # Install the providing package (pkg-virtual 20)
49 $(DPKG_INSTALL
) pkg-provides-20.deb
50 $(DPKG_INSTALL
) pkg-depends.deb
51 $(DPKG_INSTALL
) pkg-depends-eq.deb
52 ! $(DPKG_INSTALL
) pkg-depends-le.deb
53 $(DPKG_INSTALL
) pkg-depends-ge.deb
54 # Upgrade the providing package (pkg-virtual 20)
55 $(DPKG_INSTALL
) pkg-provides-20.deb
59 # Install the providing package (pkg-virtual 10 && 20)
60 $(DPKG_INSTALL
) pkg-provides-10-20.deb
61 $(DPKG_INSTALL
) pkg-depends.deb
62 $(DPKG_INSTALL
) pkg-depends-eq.deb
63 $(DPKG_INSTALL
) pkg-depends-le.deb
64 $(DPKG_INSTALL
) pkg-depends-ge.deb
65 # Upgrade the providing package (pkg-virtual 10 && 20)
66 $(DPKG_INSTALL
) pkg-provides-10-20.deb
70 $(DPKG_PURGE
) pkg-provides
72 # Install the providing package (pkg-virtual 20)
73 $(DPKG_INSTALL
) pkg-c-provides-20.deb
74 ! $(DPKG_INSTALL
) pkg-a-depends-ge-lt.deb
75 $(DPKG_PURGE
) pkg-a-depends-ge-lt
76 $(DPKG_PURGE
) pkg-c-provides
78 # Install the providing package (pkg-virtual 10)
79 $(DPKG_INSTALL
) pkg-b-provides-10.deb
80 $(DPKG_INSTALL
) pkg-a-depends-ge-lt.deb
81 # Install the providing package (pkg-virtual 20)
82 $(DPKG_INSTALL
) pkg-c-provides-20.deb
84 # Cannot purge the only package satisfying the dependency
85 ! $(DPKG_PURGE
) pkg-b-provides
86 # Can purge package not satisfying the dependency
87 $(DPKG_PURGE
) pkg-c-provides
89 $(DPKG_PURGE
) pkg-a-depends-ge-lt
90 $(DPKG_PURGE
) pkg-b-provides
92 # The provided dependency is removed, pass
93 $(DPKG_PURGE
) pkg-provides
95 define PURGE_PREDEPENDS
96 $(DPKG_PURGE
) pkg-predepends
97 $(DPKG_PURGE
) pkg-predepends-le
98 $(DPKG_PURGE
) pkg-predepends-eq
99 $(DPKG_PURGE
) pkg-predepends-ge
103 # The provided predependency is not present, fail
104 ! $(DPKG_UNPACK
) pkg-predepends.deb
105 ! $(DPKG_UNPACK
) pkg-predepends-eq.deb
106 ! $(DPKG_UNPACK
) pkg-predepends-le.deb
107 ! $(DPKG_UNPACK
) pkg-predepends-ge.deb
109 # Install the providing package (versionless)
110 $(DPKG_INSTALL
) pkg-provides.deb
111 $(DPKG_UNPACK
) pkg-predepends.deb
112 ! $(DPKG_UNPACK
) pkg-predepends-eq.deb
113 ! $(DPKG_UNPACK
) pkg-predepends-le.deb
114 ! $(DPKG_UNPACK
) pkg-predepends-ge.deb
115 # Upgrade the providing package (versionless)
116 $(DPKG_INSTALL
) pkg-provides.deb
117 ! $(DPKG_PURGE
) pkg-provides
121 # Install the providing package (pkg-virtual 10)
122 $(DPKG_INSTALL
) pkg-provides-10.deb
123 $(DPKG_UNPACK
) pkg-predepends.deb
124 $(DPKG_UNPACK
) pkg-predepends-le.deb
125 ! $(DPKG_UNPACK
) pkg-predepends-eq.deb
126 ! $(DPKG_UNPACK
) pkg-predepends-ge.deb
127 # Upgrade the providing package (pkg-virtual 10)
128 $(DPKG_INSTALL
) pkg-provides-10.deb
132 # Install the providing package (pkg-virtual 20)
133 $(DPKG_INSTALL
) pkg-provides-20.deb
134 $(DPKG_UNPACK
) pkg-predepends.deb
135 $(DPKG_UNPACK
) pkg-predepends-eq.deb
136 ! $(DPKG_UNPACK
) pkg-predepends-le.deb
137 $(DPKG_UNPACK
) pkg-predepends-ge.deb
138 # Upgrade the providing package (pkg-virtual 20)
139 $(DPKG_INSTALL
) pkg-provides-20.deb
143 # Install the providing package (pkg-virtual 10 && 20)
144 $(DPKG_INSTALL
) pkg-provides-10-20.deb
145 $(DPKG_UNPACK
) pkg-predepends.deb
146 $(DPKG_UNPACK
) pkg-predepends-eq.deb
147 $(DPKG_UNPACK
) pkg-predepends-le.deb
148 $(DPKG_UNPACK
) pkg-predepends-ge.deb
149 # Upgrade the providing package (pkg-virtual 10 && 20)
150 $(DPKG_INSTALL
) pkg-provides-10-20.deb
154 # The provided predependency is removed, pass
155 $(DPKG_PURGE
) pkg-provides
158 $(DPKG_PURGE
) pkg-breaks
159 $(DPKG_PURGE
) pkg-breaks-le
160 $(DPKG_PURGE
) pkg-breaks-eq
161 $(DPKG_PURGE
) pkg-breaks-ge
165 # The provided dependency is not present, pass
166 $(DPKG_INSTALL
) pkg-breaks.deb
167 $(DPKG_INSTALL
) pkg-breaks-eq.deb
168 $(DPKG_INSTALL
) pkg-breaks-le.deb
169 $(DPKG_INSTALL
) pkg-breaks-ge.deb
173 # Install the providing package (versionless)
174 $(DPKG_INSTALL
) pkg-provides.deb
175 ! $(DPKG_INSTALL
) pkg-breaks.deb
176 $(DPKG_INSTALL
) pkg-breaks-eq.deb
177 $(DPKG_INSTALL
) pkg-breaks-le.deb
178 $(DPKG_INSTALL
) pkg-breaks-ge.deb
179 # Upgrade the providing package (versionless)
180 $(DPKG_INSTALL
) pkg-provides.deb
181 $(DPKG_PURGE
) pkg-provides
185 # Install the providing package (pkg-virtual 10)
186 $(DPKG_INSTALL
) pkg-provides-10.deb
187 ! $(DPKG_INSTALL
) pkg-breaks.deb
188 ! $(DPKG_INSTALL
) pkg-breaks-le.deb
189 $(DPKG_INSTALL
) pkg-breaks-eq.deb
190 $(DPKG_INSTALL
) pkg-breaks-ge.deb
191 # Upgrade the providing package (pkg-virtual 10)
192 $(DPKG_INSTALL
) pkg-provides-10.deb
196 # Install the providing package (pkg-virtual 20)
197 $(DPKG_INSTALL
) pkg-provides-20.deb
198 ! $(DPKG_INSTALL
) pkg-breaks.deb
199 ! $(DPKG_INSTALL
) pkg-breaks-eq.deb
200 $(DPKG_INSTALL
) pkg-breaks-le.deb
201 ! $(DPKG_INSTALL
) pkg-breaks-ge.deb
202 # Upgrade the providing package (pkg-virtual 20)
203 $(DPKG_INSTALL
) pkg-provides-20.deb
207 # Install the providing package (pkg-virtual 10 && 20)
208 $(DPKG_INSTALL
) pkg-provides-10-20.deb
209 ! $(DPKG_INSTALL
) pkg-breaks.deb
210 ! $(DPKG_INSTALL
) pkg-breaks-eq.deb
211 ! $(DPKG_INSTALL
) pkg-breaks-le.deb
212 ! $(DPKG_INSTALL
) pkg-breaks-ge.deb
213 # Upgrade the providing package (pkg-virtual 10 && 20)
214 $(DPKG_INSTALL
) pkg-provides-10-20.deb
218 # The provided dependency is removed, pass
219 $(DPKG_PURGE
) pkg-provides
221 define PURGE_CONFLICTS
222 $(DPKG_PURGE
) pkg-conflicts
223 $(DPKG_PURGE
) pkg-conflicts-le
224 $(DPKG_PURGE
) pkg-conflicts-eq
225 $(DPKG_PURGE
) pkg-conflicts-ge
229 # The provided predependency is not present, fail
230 $(DPKG_UNPACK
) pkg-conflicts.deb
231 $(DPKG_UNPACK
) pkg-conflicts-eq.deb
232 $(DPKG_UNPACK
) pkg-conflicts-le.deb
233 $(DPKG_UNPACK
) pkg-conflicts-ge.deb
237 # Install the providing package (versionless)
238 $(DPKG_INSTALL
) pkg-provides.deb
239 ! $(DPKG_UNPACK
) pkg-conflicts.deb
240 $(DPKG_UNPACK
) pkg-conflicts-eq.deb
241 $(DPKG_UNPACK
) pkg-conflicts-le.deb
242 $(DPKG_UNPACK
) pkg-conflicts-ge.deb
243 # Upgrade the providing package (pkg-virtual versionless)
244 $(DPKG_INSTALL
) pkg-provides.deb
245 $(DPKG_PURGE
) pkg-provides
249 # Install the providing package (pkg-virtual 10)
250 $(DPKG_INSTALL
) pkg-provides-10.deb
251 ! $(DPKG_UNPACK
) pkg-conflicts.deb
252 ! $(DPKG_UNPACK
) pkg-conflicts-le.deb
253 $(DPKG_UNPACK
) pkg-conflicts-eq.deb
254 $(DPKG_UNPACK
) pkg-conflicts-ge.deb
255 # Upgrade the providing package (pkg-virtual 10)
256 $(DPKG_INSTALL
) pkg-provides-10.deb
260 # Install the providing package (pkg-virtual 20)
261 $(DPKG_INSTALL
) pkg-provides-20.deb
262 ! $(DPKG_UNPACK
) pkg-conflicts.deb
263 ! $(DPKG_UNPACK
) pkg-conflicts-eq.deb
264 $(DPKG_UNPACK
) pkg-conflicts-le.deb
265 ! $(DPKG_UNPACK
) pkg-conflicts-ge.deb
266 # Upgrade the providing package (pkg-virtual 20)
267 $(DPKG_INSTALL
) pkg-provides-20.deb
271 # Install the providing package (pkg-virtual 10 && 20)
272 $(DPKG_INSTALL
) pkg-provides-10-20.deb
273 ! $(DPKG_UNPACK
) pkg-conflicts.deb
274 ! $(DPKG_UNPACK
) pkg-conflicts-eq.deb
275 ! $(DPKG_UNPACK
) pkg-conflicts-le.deb
276 ! $(DPKG_UNPACK
) pkg-conflicts-ge.deb
277 # Upgrade the providing package (pkg-virtual 10 && 20)
278 $(DPKG_INSTALL
) pkg-provides-10-20.deb
282 # The provided predependency is removed, pass
283 $(DPKG_PURGE
) pkg-provides
285 test-case
: test-depends test-predepends test-breaks test-conflicts
288 -$(DPKG_PURGE
) pkg-depends
289 -$(DPKG_PURGE
) pkg-depends-eq
290 -$(DPKG_PURGE
) pkg-depends-ge
291 -$(DPKG_PURGE
) pkg-depends-le
292 -$(DPKG_PURGE
) pkg-predepends
293 -$(DPKG_PURGE
) pkg-predepends-eq
294 -$(DPKG_PURGE
) pkg-predepends-ge
295 -$(DPKG_PURGE
) pkg-predepends-le
296 -$(DPKG_PURGE
) pkg-breaks
297 -$(DPKG_PURGE
) pkg-breaks-eq
298 -$(DPKG_PURGE
) pkg-breaks-ge
299 -$(DPKG_PURGE
) pkg-breaks-le
300 -$(DPKG_PURGE
) pkg-conflicts
301 -$(DPKG_PURGE
) pkg-conflicts-eq
302 -$(DPKG_PURGE
) pkg-conflicts-ge
303 -$(DPKG_PURGE
) pkg-conflicts-le
304 -$(DPKG_PURGE
) pkg-provides
305 -$(DPKG_PURGE
) pkg-a-depends-ge-lt
306 -$(DPKG_PURGE
) pkg-b-provides
307 -$(DPKG_PURGE
) pkg-c-provides