Skip to content

Commit 934b9e9

Browse files
committed
fixup! bin/xbps-rindex: implement multi repo staging
1 parent 496bf14 commit 934b9e9

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

tests/xbps/xbps-rindex/add_test.sh

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,13 @@ stage_multi_repos_body() {
207207
atf_check -o ignore -- xbps-create -A noarch -n ruby-3.3.8_1 -s "ruby pkg" --shlib-provides "libruby.so.3.3" ../pkg
208208
atf_check -o ignore -- xbps-create -A noarch -n A-1.0_1 -s "A pkg" --shlib-requires "libFLAC.so.12" ../pkg
209209
atf_check -o ignore -- xbps-create -A noarch -n B-1.0_1 -s "B pkg" --shlib-requires "libruby.so.3.3" ../pkg
210+
atf_check -o ignore -- xbps-create -A noarch -n unaffected-1.0_1 -s "unaffected pkg" --shlib-provides "libfoo.so.1" ../pkg
210211
cd ..
211212

212213
cd repo2
213214
atf_check -o ignore -- xbps-create -A noarch -n AA-1.0_1 -s "AA pkg" --shlib-requires "libFLAC.so.12" ../pkg
214215
atf_check -o ignore -- xbps-create -A noarch -n BB-1.0_1 -s "BB pkg" --shlib-requires "libruby.so.3.3" ../pkg
216+
atf_check -o ignore -- xbps-create -A noarch -n other-unaffected-1.0_1 -s "other unaffected pkg" --shlib-requires "libfoo.so.1" ../pkg
215217
cd ..
216218

217219
atf_check -e ignore \
@@ -223,19 +225,21 @@ stage_multi_repos_body() {
223225
repo1/flac-1.4.3_1.noarch.xbps \
224226
repo1/ruby-3.3.8_1.noarch.xbps \
225227
repo1/A-1.0_1.noarch.xbps \
226-
repo1/B-1.0_1.noarch.xbps
228+
repo1/B-1.0_1.noarch.xbps \
229+
repo1/unaffected-1.0_1.noarch.xbps
227230
atf_check -e ignore \
228231
-o match:"index: added \`AA-1.0_1'" \
229232
-o match:"index: added \`BB-1.0_1'" \
230233
-- xbps-rindex -v -R repo1 -R repo2 -a \
231234
repo2/AA-1.0_1.noarch.xbps \
232-
repo2/BB-1.0_1.noarch.xbps
235+
repo2/BB-1.0_1.noarch.xbps \
236+
repo2/other-unaffected-1.0_1.noarch.xbps
233237

234238
cd repo1
235239
atf_check -o ignore -- xbps-create -A noarch -n flac-1.5.0_1 -s "flac pkg" --shlib-provides "libFLAC.so.14" ../pkg
236240
cd ..
237241

238-
atf_check -e ignore -o match:"stage: added \`flac-1.5.0_1'" \
242+
atf_check -e ignore -o match:"repo1: stage: added \`flac-1.5.0_1'" \
239243
-- xbps-rindex -v -R repo1 -R repo2 -a repo1/flac-1.5.0_1.noarch.xbps
240244

241245
atf_check \
@@ -247,7 +251,7 @@ stage_multi_repos_body() {
247251
atf_check -o ignore -- xbps-create -A noarch -n AA-1.0_2 -s "AA pkg" --shlib-requires "libFLAC.so.14" ../pkg
248252
cd ..
249253

250-
atf_check -o match:"stage: added \`AA-1.0_2'" \
254+
atf_check -o match:"repo2: stage: added \`AA-1.0_2'" \
251255
-- xbps-rindex -v -R repo1 -R repo2 -a repo2/AA-1.0_2.noarch.xbps
252256

253257
atf_check \
@@ -258,7 +262,7 @@ stage_multi_repos_body() {
258262
cd repo1
259263
atf_check -o ignore -- xbps-create -A noarch -n ruby-3.4.5_1 -s "ruby pkg" --shlib-provides "libruby.so.3.4" ../pkg
260264
cd ..
261-
atf_check -o match:"stage: added \`ruby-3.4.5_1'" \
265+
atf_check -o match:"repo1: stage: added \`ruby-3.4.5_1'" \
262266
-- xbps-rindex -v -R repo1 -R repo2 -a repo1/ruby-3.4.5_1.noarch.xbps
263267

264268
atf_check \
@@ -269,15 +273,15 @@ stage_multi_repos_body() {
269273
cd repo2
270274
atf_check -o ignore -- xbps-create -A noarch -n BB-1.0_2 -s "BB pkg" --shlib-requires "libruby.so.3.4" ../pkg
271275
cd ..
272-
atf_check -o match:"stage: added \`BB-1.0_2'" \
276+
atf_check -o match:"repo2: stage: added \`BB-1.0_2'" \
273277
-- xbps-rindex -v -R repo1 -R repo2 -a repo2/BB-1.0_2.noarch.xbps
274278

275279
cd repo1
276280
atf_check -o ignore -- xbps-create -A noarch -n A-1.0_2 -s "A pkg" --shlib-requires "libFLAC.so.14" ../pkg
277281
atf_check -o ignore -- xbps-create -A noarch -n B-1.0_2 -s "B pkg" --shlib-requires "libruby.so.3.4" ../pkg
278282
cd ..
279283
atf_check \
280-
-o match:"stage: added \`A-1.0_2'" \
284+
-o match:"repo1: stage: added \`A-1.0_2'" \
281285
-- xbps-rindex -v -R repo1 -R repo2 -a repo1/A-1.0_2.noarch.xbps
282286

283287
atf_check \
@@ -286,12 +290,12 @@ stage_multi_repos_body() {
286290
-- xbps-query -r ../root -i --repository=repo1 --repository=repo2 -L
287291

288292
atf_check \
289-
-o match:"index: added \`A-1\.0_2'" \
290-
-o match:"index: added \`B-1\.0_2'" \
291-
-o match:"index: added \`flac-1\.5\.0_1'" \
292-
-o match:"index: added \`ruby-3\.4\.5_1'" \
293-
-o match:"index: added \`AA-1\.0_2'" \
294-
-o match:"index: added \`BB-1\.0_2'" \
293+
-o match:"repo1: index: added \`A-1\.0_2'" \
294+
-o match:"repo1: index: added \`B-1\.0_2'" \
295+
-o match:"repo1: index: added \`flac-1\.5\.0_1'" \
296+
-o match:"repo1: index: added \`ruby-3\.4\.5_1'" \
297+
-o match:"repo2: index: added \`AA-1\.0_2'" \
298+
-o match:"repo2: index: added \`BB-1\.0_2'" \
295299
-- xbps-rindex -v -R repo1 -R repo2 -a repo1/B-1.0_2.noarch.xbps
296300

297301
atf_check \

0 commit comments

Comments
 (0)