Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/pkg
Path: blob/main/tests/frontend/conflicts.sh
2648 views
1
#! /usr/bin/env atf-sh
2
3
. $(atf_get_srcdir)/test_environment.sh
4
5
tests_init \
6
more_complex_choice \
7
complex_conflicts \
8
fileexists_notinpkg \
9
find_conflicts \
10
split_upgrades \
11
split_upgrades_dir \
12
13
# install foo
14
# foo depends on bar-1.0
15
# foo is upgraded to new dep on bar1-1.0 & bar is updated to 2.0
16
# bar1 and bar conflict with each other
17
complex_conflicts_body() {
18
echo "bar-1.0" > file1
19
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg bar bar 1.0 "${TMPDIR}"
20
cat << EOF >> bar.ucl
21
files: {
22
${TMPDIR}/file1: "",
23
}
24
EOF
25
26
atf_check \
27
-o empty \
28
-e empty \
29
-s exit:0 \
30
pkg create -M ./bar.ucl -o ./repo/
31
32
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg foo foo 1.0 "${TMPDIR}"
33
cat << EOF >> foo.ucl
34
deps: {
35
bar: {
36
origin: "bar",
37
version: "1.0"
38
}
39
}
40
EOF
41
42
atf_check \
43
-o empty \
44
-e empty \
45
-s exit:0 \
46
pkg create -M ./foo.ucl -o ./repo/
47
48
cat << EOF > pkg.conf
49
PKG_DBDIR=${TMPDIR}
50
REPOS_DIR=[]
51
repositories: {
52
local: { url : file://${TMPDIR}/repo }
53
}
54
EOF
55
56
atf_check \
57
-o inline:"Creating repository in ./repo: done\nPacking files for repository: done\n" \
58
-e empty \
59
-s exit:0 \
60
pkg -C ./pkg.conf repo ./repo
61
62
atf_check \
63
-o ignore \
64
-s exit:0 \
65
pkg -C ./pkg.conf update -f
66
67
atf_check \
68
-o match:"Installing foo-1\.0" \
69
-s exit:0 \
70
pkg -C ./pkg.conf install -y foo
71
72
# Upgrade bar
73
rm -fr repo
74
echo "bar-2.0" > file1
75
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg bar bar 2.0 "${TMPDIR}"
76
cat << EOF >> bar.ucl
77
files: {
78
${TMPDIR}/file1: "",
79
}
80
EOF
81
82
atf_check \
83
-o empty \
84
-e empty \
85
-s exit:0 \
86
pkg create -M ./bar.ucl -o ./repo/
87
88
# Create bar1-1.1
89
echo "bar-1.1" > file1
90
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg bar1 bar1 1.1 "${TMPDIR}"
91
cat << EOF >> bar1.ucl
92
files: {
93
${TMPDIR}/file1: "",
94
}
95
EOF
96
97
atf_check \
98
-o empty \
99
-e empty \
100
-s exit:0 \
101
pkg create -M ./bar1.ucl -o ./repo/
102
103
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg foo foo 1.0_1 "${TMPDIR}"
104
cat << EOF >> foo.ucl
105
deps: {
106
bar1: {
107
origin: "bar1",
108
version: "1.1"
109
}
110
}
111
EOF
112
113
atf_check \
114
-o empty \
115
-e empty \
116
-s exit:0 \
117
pkg create -M ./foo.ucl -o ./repo/
118
119
atf_check \
120
-o inline:"Creating repository in ./repo: done\nPacking files for repository: done\n" \
121
-e empty \
122
-s exit:0 \
123
pkg -C ./pkg.conf repo ./repo
124
125
atf_check \
126
-o ignore \
127
-e empty \
128
-s exit:0 \
129
pkg -C ./pkg.conf update -f
130
131
OUTPUT="Updating local repository catalogue...
132
local repository is up to date.
133
All repositories are up to date.
134
Checking for upgrades (2 candidates): done
135
Processing candidates (2 candidates): done
136
Checking integrity... done (2 conflicting)
137
- bar1-1.1 conflicts with bar-1.0 on ${TMPDIR}/file1
138
- bar1-1.1 conflicts with bar-2.0 on ${TMPDIR}/file1
139
Cannot solve problem using SAT solver, trying another plan
140
Checking integrity... done (0 conflicting)
141
The following 3 package(s) will be affected (of 0 checked):
142
143
New packages to be INSTALLED:
144
bar1: 1.1
145
146
Installed packages to be UPGRADED:
147
foo: 1.0 -> 1.0_1
148
149
Installed packages to be REMOVED:
150
bar: 1.0
151
152
Number of packages to be removed: 1
153
Number of packages to be installed: 1
154
Number of packages to be upgraded: 1
155
${JAILED}[1/4] Deinstalling foo-1.0...
156
${JAILED}[2/4] Deinstalling bar-1.0...
157
${JAILED}[2/4] Deleting files for bar-1.0: done
158
${JAILED}[3/4] Installing bar1-1.1...
159
${JAILED}[3/4] Extracting bar1-1.1: done
160
${JAILED}[4/4] Installing foo-1.0_1...
161
"
162
163
atf_check \
164
-o inline:"${OUTPUT}" \
165
-e empty \
166
-s exit:0 \
167
pkg -C ./pkg.conf upgrade -y
168
169
atf_check \
170
-o match:"foo-1.0_1" \
171
-o match:"bar1-1.1" \
172
-o not-match:"bar-2.0" \
173
-e empty \
174
-s exit:0 \
175
pkg info
176
}
177
178
# install foo
179
# foo depends on bar-1.0
180
# foo is upgraded to new dep on bar1-1.0 & bar is updated to 2.0
181
# other still depends on bar1-1.0
182
# bar1 and bar conflict with each other
183
# install arp, which also depends on new bar1-1.0
184
#
185
# This also tests that other is deleted before the first half of the split
186
# upgrade foo job and arp is installed after the second half despite the default
187
# lexicographical job ordering when there are no hard ordering requirements.
188
# This behavior minimizes the distance between the split halves of an upgrade in
189
# the execution order.
190
more_complex_choice_body()
191
{
192
echo "bar-1.0" > file1
193
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg bar bar 1.0 "${TMPDIR}"
194
cat << EOF >> bar.ucl
195
files: {
196
${TMPDIR}/file1: "",
197
}
198
EOF
199
200
atf_check \
201
-o empty \
202
-e empty \
203
-s exit:0 \
204
pkg create -M ./bar.ucl -o ./repo/
205
206
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg foo foo 1.0 "${TMPDIR}"
207
cat << EOF >> foo.ucl
208
deps: {
209
bar: {
210
origin: "bar",
211
version: "1.0"
212
}
213
}
214
EOF
215
216
atf_check \
217
-o empty \
218
-e empty \
219
-s exit:0 \
220
pkg create -M ./foo.ucl -o ./repo/
221
222
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg other other 1.0 "${TMPDIR}"
223
cat << EOF >> other.ucl
224
deps: {
225
bar: {
226
origin: "bar",
227
version: "1.0"
228
}
229
}
230
EOF
231
232
atf_check pkg create -M ./other.ucl -o ./repo/
233
234
cat << EOF > pkg.conf
235
PKG_DBDIR=${TMPDIR}
236
REPOS_DIR=[]
237
repositories: {
238
local: { url : file://${TMPDIR}/repo }
239
}
240
EOF
241
242
atf_check \
243
-o inline:"Creating repository in ./repo: done\nPacking files for repository: done\n" \
244
-e empty \
245
-s exit:0 \
246
pkg -C ./pkg.conf repo ./repo
247
248
atf_check \
249
-o ignore \
250
-s exit:0 \
251
pkg -C ./pkg.conf update -f
252
253
atf_check \
254
-o match:"Installing foo-1\.0" \
255
-o match:"Installing other-1\.0" \
256
-s exit:0 \
257
pkg -C ./pkg.conf install -y foo other
258
259
# Upgrade bar
260
rm -fr repo
261
echo "bar-2.0" > file1
262
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg bar bar 2.0 "${TMPDIR}"
263
cat << EOF >> bar.ucl
264
files: {
265
${TMPDIR}/file1: "",
266
}
267
EOF
268
269
atf_check \
270
-o empty \
271
-e empty \
272
-s exit:0 \
273
pkg create -M ./bar.ucl -o ./repo/
274
275
# Create bar1-1.1
276
echo "bar-1.1" > file1
277
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg bar1 bar1 1.1 "${TMPDIR}"
278
cat << EOF >> bar1.ucl
279
files: {
280
${TMPDIR}/file1: "",
281
}
282
EOF
283
284
# Upgrade foo
285
atf_check \
286
-o empty \
287
-e empty \
288
-s exit:0 \
289
pkg create -M ./bar1.ucl -o ./repo/
290
291
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg foo foo 1.0_1 "${TMPDIR}"
292
cat << EOF >> foo.ucl
293
deps: {
294
bar1: {
295
origin: "bar1",
296
version: "1.1"
297
}
298
}
299
EOF
300
301
# Create arp
302
atf_check \
303
-o empty \
304
-e empty \
305
-s exit:0 \
306
pkg create -M ./foo.ucl -o ./repo/
307
308
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg arp arp 1.0_1 "${TMPDIR}"
309
cat << EOF >> arp.ucl
310
deps: {
311
bar1: {
312
origin: "bar1",
313
version: "1.1"
314
}
315
}
316
EOF
317
318
atf_check \
319
-o empty \
320
-e empty \
321
-s exit:0 \
322
pkg create -M ./arp.ucl -o ./repo/
323
324
atf_check \
325
-o inline:"Creating repository in ./repo: done\nPacking files for repository: done\n" \
326
-e empty \
327
-s exit:0 \
328
pkg -C ./pkg.conf repo ./repo
329
330
atf_check \
331
-o ignore \
332
-e empty \
333
-s exit:0 \
334
pkg -C ./pkg.conf update -f
335
336
OUTPUT="Updating local repository catalogue...
337
local repository is up to date.
338
All repositories are up to date.
339
Checking integrity... done (1 conflicting)
340
- bar1-1.1 conflicts with bar-1.0 on ${TMPDIR}/file1
341
Checking integrity... done (0 conflicting)
342
The following 5 package(s) will be affected (of 0 checked):
343
344
New packages to be INSTALLED:
345
arp: 1.0_1
346
bar1: 1.1
347
348
Installed packages to be UPGRADED:
349
foo: 1.0 -> 1.0_1
350
351
Installed packages to be REMOVED:
352
bar: 1.0
353
other: 1.0
354
355
Number of packages to be removed: 2
356
Number of packages to be installed: 2
357
Number of packages to be upgraded: 1
358
${JAILED}[1/6] Deinstalling other-1.0...
359
${JAILED}[2/6] Deinstalling foo-1.0...
360
${JAILED}[3/6] Deinstalling bar-1.0...
361
${JAILED}[3/6] Deleting files for bar-1.0: done
362
${JAILED}[4/6] Installing bar1-1.1...
363
${JAILED}[4/6] Extracting bar1-1.1: done
364
${JAILED}[5/6] Installing foo-1.0_1...
365
${JAILED}[6/6] Installing arp-1.0_1...
366
"
367
368
atf_check \
369
-o inline:"${OUTPUT}" \
370
-e empty \
371
-s exit:0 \
372
pkg -C ./pkg.conf install -y arp
373
374
atf_check \
375
-o match:"foo-1.0_1" \
376
-o match:"bar1-1.1" \
377
-o not-match:"other-1.0" \
378
-o not-match:"bar-2.0" \
379
-e empty \
380
-s exit:0 \
381
pkg info
382
}
383
384
fileexists_notinpkg_body()
385
{
386
mkdir -p ${TMPDIR}/target/${TMPDIR}
387
echo "entry" > ${TMPDIR}/target/${TMPDIR}/a
388
unset PKG_DBDIR
389
390
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "2"
391
echo "entry 2" > a
392
echo "${TMPDIR}/a" > plist
393
394
atf_check \
395
pkg create -M test.ucl -p plist
396
397
pkg repo .
398
mkdir reposconf
399
echo "local: { url: file://${TMPDIR} }" > reposconf/local.conf
400
atf_check \
401
pkg -o REPOS_DIR=${TMPDIR}/reposconf -r ${TMPDIR}/target install -qy test
402
403
test -f ${TMPDIR}/target/${TMPDIR}/a.pkgsave || atf_fail "file not saved when it should have"
404
405
# Test the nominal situation just in case
406
rm -f ${TMPDIR}/target/${TMPDIR}/a.pkgsave
407
atf_check \
408
pkg -o REPOS_DIR=${TMPDIR}/reposconf -r ${TMPDIR}/target install -qyf test
409
test -f ${TMPDIR}/target/${TMPDIR}/a.pkgsave && atf_fail "file saved when it should not have"
410
411
# Test if both files are identical
412
atf_check \
413
pkg -o REPOS_DIR=${TMPDIR}/reposconf -r ${TMPDIR}/target delete -qyf test
414
echo "entry 2" > ${TMPDIR}/target/${TMPDIR}/a
415
atf_check \
416
pkg -o REPOS_DIR=${TMPDIR}/reposconf -r ${TMPDIR}/target install -qyf test
417
test -f ${TMPDIR}/target/${TMPDIR}/a.pkgsave && atf_fail "file saved when it should not have"
418
return 0
419
}
420
421
find_conflicts_body() {
422
touch a
423
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_manifest test 1 /
424
cat << EOF >> +MANIFEST
425
files: {
426
${TMPDIR}/a: "",
427
}
428
EOF
429
atf_check \
430
-o match:".*Installing.*\.\.\.$" \
431
-e empty \
432
-s exit:0 \
433
pkg register -M +MANIFEST
434
435
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_manifest test2 1 /
436
cat << EOF >> +MANIFEST
437
files: {
438
${TMPDIR}/a: "",
439
}
440
EOF
441
442
atf_check \
443
-o empty \
444
-e empty \
445
-s exit:0 \
446
pkg create -M +MANIFEST -o .
447
448
atf_check \
449
-o inline:"Creating repository in .: done\nPacking files for repository: done\n" \
450
-e empty \
451
-s exit:0 \
452
pkg repo .
453
454
mkdir reposconf
455
cat << EOF >> reposconf/repo.conf
456
local: {
457
url: file:///${TMPDIR},
458
enabled: true
459
}
460
EOF
461
462
OUTPUT="Updating local repository catalogue...
463
${JAILED}Fetching meta.conf: done
464
${JAILED}Fetching data: done
465
Processing entries: done
466
local repository update completed. 1 packages processed.
467
All repositories are up to date.
468
Updating database digests format: done
469
Checking integrity... done (1 conflicting)
470
- test2-1 conflicts with test-1 on ${TMPDIR}/a
471
Checking integrity... done (0 conflicting)
472
The following 2 package(s) will be affected (of 0 checked):
473
474
New packages to be INSTALLED:
475
test2: 1
476
477
Installed packages to be REMOVED:
478
test: 1
479
480
Number of packages to be removed: 1
481
Number of packages to be installed: 1
482
${JAILED}[1/2] Deinstalling test-1...
483
${JAILED}[1/2] Deleting files for test-1: done
484
${JAILED}[2/2] Installing test2-1...
485
${JAILED}[2/2] Extracting test2-1: done
486
"
487
atf_check \
488
-o inline:"${OUTPUT}" \
489
-s exit:0 \
490
pkg -o REPOS_DIR="${TMPDIR}/reposconf" -o PKG_CACHEDIR="${TMPDIR}" install -y test2-1
491
}
492
493
split_upgrades_body() {
494
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "testa" "testa" "2.0"
495
echo "entry" > a
496
echo "entry" > c
497
echo "${TMPDIR}/a" > plist
498
echo "${TMPDIR}/c" >> plist
499
atf_check \
500
pkg create -M testa.ucl -p plist
501
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "testb" "testb" "2"
502
echo "entry" > b
503
echo "${TMPDIR}/b" > plist
504
cat << EOF >> testb.ucl
505
deps: {
506
testa: {
507
origin: "testa",
508
version: "1"
509
}
510
}
511
EOF
512
atf_check \
513
pkg create -M testb.ucl -p plist
514
pkg repo .
515
mkdir target
516
mkdir reposconf
517
cat << EOF >> reposconf/repo.conf
518
local: {
519
url: file:///${TMPDIR},
520
enabled: true
521
}
522
EOF
523
524
atf_check \
525
pkg -C /dev/null -o REPOS_DIR="${TMPDIR}/reposconf" -o PKG_CACHEDIR="${TMPDIR}" -r ${TMPDIR}/target install -qy testb
526
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "testa-lib" "testa-lib" "2.0"
527
echo "entry" > a
528
echo "${TMPDIR}/a" > plist
529
atf_check \
530
pkg create -M testa-lib.ucl -p plist
531
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "testa" "testa" "2.1"
532
echo "entry" > c
533
echo "${TMPDIR}/c" > plist
534
atf_check \
535
pkg create -M testa.ucl -p plist
536
cat << EOF >> testa.ucl
537
deps: {
538
testa-lib: {
539
origin: "testa-lib",
540
version: "1"
541
}
542
}
543
EOF
544
545
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "testb" "testb" "2"
546
echo "entry" > b
547
echo "${TMPDIR}/b" > plist
548
cat << EOF >> testb.ucl
549
deps: {
550
testa-lib: {
551
origin: "testa-lib",
552
version: "1"
553
}
554
}
555
EOF
556
atf_check \
557
pkg create -M testb.ucl -p plist
558
pkg repo .
559
560
OUTPUT="Updating local repository catalogue...
561
${JAILED}Fetching meta.conf: done
562
${JAILED}Fetching data: done
563
Processing entries: done
564
local repository update completed. 4 packages processed.
565
All repositories are up to date.
566
"
567
atf_check \
568
-o inline:"${OUTPUT}" \
569
pkg -C /dev/null -o REPOS_DIR="${TMPDIR}/reposconf" -o PKG_CACHEDIR="${TMPDIR}" -r ${TMPDIR}/target update -f
570
571
OUTPUT="Updating local repository catalogue...
572
local repository is up to date.
573
All repositories are up to date.
574
Checking for upgrades (2 candidates): done
575
Processing candidates (2 candidates): done
576
Checking integrity... done (2 conflicting)
577
- testa-lib-2.0 conflicts with testa-2.0 on ${TMPDIR}/a
578
- testa-lib-2.0 conflicts with testa-2.0 on ${TMPDIR}/a
579
Checking integrity... done (0 conflicting)
580
The following 3 package(s) will be affected (of 0 checked):
581
582
New packages to be INSTALLED:
583
testa-lib: 2.0
584
585
Installed packages to be UPGRADED:
586
testa: 2.0 -> 2.1
587
588
Installed packages to be REINSTALLED:
589
testb-2 (direct dependency changed: testa-lib)
590
591
Number of packages to be installed: 1
592
Number of packages to be upgraded: 1
593
Number of packages to be reinstalled: 1
594
${JAILED}[1/4] Deinstalling testb-2...
595
${JAILED}[1/4] Deleting files for testb-2: done
596
${JAILED}[2/4] Upgrading testa from 2.0 to 2.1...
597
${JAILED}[2/4] Extracting testa-2.1: done
598
${JAILED}[3/4] Installing testa-lib-2.0...
599
${JAILED}[3/4] Extracting testa-lib-2.0: done
600
${JAILED}[4/4] Installing testb-2...
601
${JAILED}[4/4] Extracting testb-2: done
602
"
603
atf_check \
604
-o inline:"${OUTPUT}" \
605
pkg -C /dev/null -o REPOS_DIR="${TMPDIR}/reposconf" -o PKG_CACHEDIR="${TMPDIR}" -r ${TMPDIR}/target upgrade -y
606
}
607
608
split_upgrades_dir_body() {
609
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "testa" "testa" "2.0"
610
echo "entry" > a
611
echo "entry" > c
612
echo "${TMPDIR}/a" > plist
613
echo "${TMPDIR}/c" >> plist
614
mkdir -p plop
615
echo "@dir ${TMPDIR}/plop" >> plist
616
atf_check \
617
pkg create -M testa.ucl -p plist
618
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "testb" "testb" "2"
619
echo "entry" > b
620
echo "${TMPDIR}/b" > plist
621
cat << EOF >> testb.ucl
622
deps: {
623
testa: {
624
origin: "testa",
625
version: "1"
626
}
627
}
628
EOF
629
atf_check \
630
pkg create -M testb.ucl -p plist
631
pkg repo .
632
mkdir target
633
mkdir reposconf
634
cat << EOF >> reposconf/repo.conf
635
local: {
636
url: file:///${TMPDIR},
637
enabled: true
638
}
639
EOF
640
641
atf_check \
642
pkg -C /dev/null -o REPOS_DIR="${TMPDIR}/reposconf" -o PKG_CACHEDIR="${TMPDIR}" -r ${TMPDIR}/target install -qy testb
643
atf_check test -d target/${TMPDIR}/plop
644
inode=$(ls -ia target/${TMPDIR}/plop)
645
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "testa-lib" "testa-lib" "2.0"
646
echo "entry" > a
647
echo "${TMPDIR}/a" > plist
648
atf_check \
649
pkg create -M testa-lib.ucl -p plist
650
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "testa" "testa" "2.1"
651
echo "entry" > c
652
echo "${TMPDIR}/c" > plist
653
echo "@dir ${TMPDIR}/plop" >> plist
654
atf_check \
655
pkg create -M testa.ucl -p plist
656
cat << EOF >> testa.ucl
657
deps: {
658
testa-lib: {
659
origin: "testa-lib",
660
version: "1"
661
}
662
}
663
EOF
664
665
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "testb" "testb" "2"
666
echo "entry" > b
667
echo "${TMPDIR}/b" > plist
668
echo "@dir ${TMPDIR}/plop" > plist
669
cat << EOF >> testb.ucl
670
deps: {
671
testa-lib: {
672
origin: "testa-lib",
673
version: "1"
674
}
675
}
676
EOF
677
atf_check \
678
pkg create -M testb.ucl -p plist
679
pkg repo .
680
681
OUTPUT="Updating local repository catalogue...
682
${JAILED}Fetching meta.conf: done
683
${JAILED}Fetching data: done
684
Processing entries: done
685
local repository update completed. 4 packages processed.
686
All repositories are up to date.
687
"
688
atf_check \
689
-o inline:"${OUTPUT}" \
690
pkg -C /dev/null -o REPOS_DIR="${TMPDIR}/reposconf" -o PKG_CACHEDIR="${TMPDIR}" -r ${TMPDIR}/target update -f
691
692
OUTPUT="Updating local repository catalogue...
693
local repository is up to date.
694
All repositories are up to date.
695
Checking for upgrades (2 candidates): done
696
Processing candidates (2 candidates): done
697
Checking integrity... done (2 conflicting)
698
- testa-lib-2.0 conflicts with testa-2.0 on ${TMPDIR}/a
699
- testa-lib-2.0 conflicts with testa-2.0 on ${TMPDIR}/a
700
Checking integrity... done (0 conflicting)
701
The following 3 package(s) will be affected (of 0 checked):
702
703
New packages to be INSTALLED:
704
testa-lib: 2.0
705
706
Installed packages to be UPGRADED:
707
testa: 2.0 -> 2.1
708
709
Installed packages to be REINSTALLED:
710
testb-2 (direct dependency changed: testa-lib)
711
712
Number of packages to be installed: 1
713
Number of packages to be upgraded: 1
714
Number of packages to be reinstalled: 1
715
${JAILED}[1/4] Deinstalling testb-2...
716
${JAILED}[1/4] Deleting files for testb-2: done
717
${JAILED}[2/4] Upgrading testa from 2.0 to 2.1...
718
${JAILED}[2/4] Extracting testa-2.1: done
719
${JAILED}[3/4] Installing testa-lib-2.0...
720
${JAILED}[3/4] Extracting testa-lib-2.0: done
721
${JAILED}[4/4] Installing testb-2...
722
${JAILED}[4/4] Extracting testb-2: done
723
"
724
atf_check \
725
-o inline:"${OUTPUT}" \
726
pkg -C /dev/null -o REPOS_DIR="${TMPDIR}/reposconf" -o PKG_CACHEDIR="${TMPDIR}" -r ${TMPDIR}/target upgrade -y
727
atf_check -o inline:"${inode}\n" ls -ia target/${TMPDIR}/plop
728
}
729
730