forked from 0install/0install
/
solves.xml
1006 lines (927 loc) · 42 KB
/
solves.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version='1.0' ?>
<test-cases xmlns='http://zero-install.sourceforge.net/2004/injector/interface'>
<test name='trivial' add-downloads='true'>
<interface uri='http://example.com/prog.xml' min-injector-version='1'>
<name>0install</name>
<implementation id='v1' version='1'><command name='run' path='main'/></implementation>
</interface>
<requirements command='run' interface='http://example.com/prog.xml'/>
<selections source="false" command="run" interface="http://example.com/prog.xml">
<selection id='v1' interface='http://example.com/prog.xml' mode='immediate' version='1'>
<command name="run" path="main"/>
</selection>
</selections>
</test>
<test name='binding-order' add-downloads='true'>
<interface uri='http://example.com/lib1.xml'>
<name>lib1</name>
<implementation id='l1' version='1'/>
</interface>
<interface uri='http://example.com/lib2.xml'>
<name>lib2</name>
<implementation id='l2' version='1'/>
</interface>
<interface uri='http://example.com/prog.xml' min-injector-version='1'>
<name>0install</name>
<implementation id='v1' version='1'>
<command name='run' path='main'>
<requires interface='http://example.com/lib1.xml'/>
<requires interface='http://example.com/lib2.xml'/>
</command>
<environment name='VAR' insert='a'/>
<environment name='VAR' insert='b'/>
</implementation>
</interface>
<requirements command='run' interface='http://example.com/prog.xml'/>
<selections source="false" command="run" interface="http://example.com/prog.xml">
<selection id='l1' interface='http://example.com/lib1.xml' mode='immediate' version='1'/>
<selection id='l2' interface='http://example.com/lib2.xml' mode='immediate' version='1'/>
<selection id='v1' interface='http://example.com/prog.xml' mode='immediate' version='1'>
<command name="run" path="main">
<requires interface='http://example.com/lib1.xml'/>
<requires interface='http://example.com/lib2.xml'/>
</command>
<environment name='VAR' insert='a'/>
<environment name='VAR' insert='b'/>
</selection>
</selections>
</test>
<test name='mutliple-impls' add-downloads='true'>
<interface uri='http://example.com/prog.xml'>
<name>0install</name>
<implementation id='z2' version='2'><command name='run' path='main'/></implementation>
<implementation id='a1' version='1'><command name='run' path='main'/></implementation>
<implementation id='m3' version='3'><command name='run' path='main'/></implementation>
</interface>
<requirements command='run' interface='http://example.com/prog.xml'/>
<selections source="false" command="run" interface="http://example.com/prog.xml">
<selection id='m3' interface='http://example.com/prog.xml' mode='immediate' version='3'>
<command name="run" path="main"/>
</selection>
</selections>
</test>
<test name='deps' add-downloads='true'>
<interface uri='http://example.com/tester.xml'>
<name>tester</name>
<implementation id='t1' version='1'>
<command name='run' path='tester'/>
</implementation>
</interface>
<interface uri='http://example.com/lib.xml'>
<name>lib</name>
<implementation id='z2' version='2'>
<command name='run' path='prog'/>
<command name='test' path='test-prog'>
<runner interface='http://example.com/tester.xml'/>
<requires interface='http://example.com/missing.xml' importance='recommended'/>
</command>
<command name='gui' path='gui'/>
</implementation>
<implementation id='a1' version='1'/>
<implementation id='m3' version='3'/>
</interface>
<interface uri='http://example.com/unused.xml'>
<name>unused</name>
<implementation id='m3' version='3'/>
</interface>
<interface uri='http://example.com/prog.xml'>
<name>prog</name>
<group>
<binding name='foo'/>
<requires interface='http://example.com/lib.xml'>
<executable-in-path name='lib' command='run'/>
<executable-in-path name='test-lib' command='test'/>
</requires>
<implementation id='z2' version='2'><command name='run' path='main'/></implementation>
<implementation id='a1' version='1'><command name='run' path='main'/>
<requires interface='http://example.com/missing.xml'/>
<requires interface='http://example.com/unused.xml'/>
</implementation>
<implementation id='m3' version='3'><command name='run' path='main'/></implementation>
</group>
</interface>
<requirements command='run' interface='http://example.com/prog.xml'/>
<selections source="false" command="run" interface="http://example.com/prog.xml">
<selection id='z2' interface='http://example.com/lib.xml' mode='immediate' version='2'>
<command name='run' path='prog'/>
<command name='test' path='test-prog'>
<runner interface='http://example.com/tester.xml'/>
<requires interface='http://example.com/missing.xml' importance='recommended'/>
</command>
</selection>
<selection id='m3' interface='http://example.com/prog.xml' mode='immediate' version='3'>
<command name="run" path="main"/>
<binding name='foo'/>
<requires interface='http://example.com/lib.xml'>
<executable-in-path name='lib' command='run'/>
<executable-in-path name='test-lib' command='test'/>
</requires>
</selection>
<selection id='t1' interface='http://example.com/tester.xml' mode='immediate' version='1'>
<command name='run' path='tester'/>
</selection>
</selections>
</test>
<test name='ignored-deps' add-downloads='true'>
<interface uri='http://example.com/unused.xml'>
<name>unused</name>
<implementation id='m3' version='3'/>
</interface>
<interface uri='http://example.com/prog.xml'>
<name>prog</name>
<implementation id='v1' version='1'>
<command name='run'>
<requires interface='http://example.com/Missing.xml' os='nosuchos'/>
</command>
<requires interface='http://example.com/Missing2.xml' use='never'/>
</implementation>
</interface>
<requirements command='run' interface='http://example.com/prog.xml'/>
<selections source="false" command='run' interface="http://example.com/prog.xml">
<selection id='v1' interface='http://example.com/prog.xml' mode='immediate' version='1'>
<command name='run'/>
</selection>
</selections>
</test>
<test name='restrictions' add-downloads='true'>
<interface uri='http://example.com/lib.xml'>
<name>lib</name>
<implementation id='l0' version='0' arch='invalid-arch'/>
<implementation id='l1' version='1'/>
<implementation id='l2' version='2'>
<restricts interface='http://example.com/prog.xml'>
<version before='3'/>
</restricts>
</implementation>
<implementation id='l3' version='3'/>
</interface>
<interface uri='http://example.com/prog.xml'>
<name>prog</name>
<group>
<command name="run" path="main">
<restricts interface='http://example.com/unused.xml' version='1'/>
</command>
<requires interface='http://example.com/lib.xml' version='2..!3'/>
<implementation id='p2' version='2'></implementation>
<implementation id='p1' version='1'></implementation>
<implementation id='p3' version='3'></implementation>
</group>
</interface>
<interface uri='http://example.com/other.xml'>
<name>other</name>
<implementation id='o1' version='1'/>
</interface>
<requirements command='run' interface='http://example.com/prog.xml'/>
<selections source="false" command="run" interface="http://example.com/prog.xml">
<selection id='l2' interface='http://example.com/lib.xml' mode='immediate' version='2'/>
<selection id='p2' interface='http://example.com/prog.xml' mode='immediate' version='2'>
<command name="run" path="main"/>
<requires interface='http://example.com/lib.xml' version='2..!3'/>
</selection>
</selections>
<justification interface='http://example.com/prog.xml' id='p1'>
1 is ranked lower than 2: newer versions are preferred
</justification>
<justification interface='http://example.com/prog.xml' id='p2'>
http://example.com/prog.xml 2 was selected as the preferred version.
</justification>
<justification interface='http://example.com/prog.xml' id='p3'>
There is no possible selection using http://example.com/prog.xml 3.
Can't find all required implementations:
- http://example.com/lib.xml -> (problem)
http://example.com/prog.xml 3 requires version 2..!3
Rejected candidates:
l3 (3): Incompatible with restriction: version 2..!3
l2 (2): Requires http://example.com/prog.xml version ..!3
l1 (1): Incompatible with restriction: version 2..!3
l0 (0): Not compatible with the requested OS type
- http://example.com/prog.xml -> 3 (p3)
</justification>
<justification interface='http://example.com/prog.xml' id='p4'>
Implementation to consider (http://example.com/prog.xml p4) does not exist!
</justification>
<justification interface='http://example.com/other.xml' id='o1'>
If http://example.com/other.xml o1 were the only option, the best available solution wouldn't use it.
</justification>
<justification interface='http://example.com/lib.xml' id='l0'>
http://example.com/lib.xml 0 cannot be used (regardless of other components): Not compatible with the requested OS type
</justification>
</test>
<test name='impossible' add-downloads='true'>
<interface uri='http://example.com/lib.xml'>
<name>lib</name>
<implementation id='l1' version='1'>
<restricts interface='http://example.com/prog.xml'>
<version before='2'/>
</restricts>
</implementation>
<implementation id='l2' version='2'>
<restricts interface='http://example.com/prog.xml'>
<version not-before='2'/>
</restricts>
</implementation>
</interface>
<interface uri='http://example.com/prog.xml'>
<name>prog</name>
<group>
<command name='run' path='main'/>
<requires interface='http://example.com/lib.xml'/>
<implementation id='p1' version='1'>
<restricts interface='http://example.com/lib.xml' version='2'/>
</implementation>
<implementation id='p2' version='2'>
<restricts interface='http://example.com/lib.xml' version='1..!2'/>
</implementation>
</group>
</interface>
<requirements command='run' interface='http://example.com/prog.xml' fails='true'/>
<problem>Can't find all required implementations:
- http://example.com/lib.xml -> (problem)
http://example.com/prog.xml 2 requires version 1..!2
Rejected candidates:
l2 (2): Incompatible with restriction: version 1..!2
l1 (1): Requires http://example.com/prog.xml version ..!2
- http://example.com/prog.xml -> 2 (p2)
</problem>
</test>
<test name='if-version' add-downloads='true'>
<interface uri='http://example.com/prog.xml'>
<name>0install</name>
<implementation id='v1' version='1'>
<command name='run' path='new-path' if-0install-version='1..'/>
<command name='run' path='old-path' if-0install-version='..!1'/>
</implementation>
</interface>
<requirements command='run' interface='http://example.com/prog.xml'/>
<selections source="false" command="run" interface="http://example.com/prog.xml">
<selection id='v1' interface='http://example.com/prog.xml' mode='immediate' version='1'>
<command name="run" path="new-path"/>
</selection>
</selections>
</test>
<!-- Can't select lib1 because of the 'distribution' restriction. -->
<test name='requires-distro' add-downloads='true'>
<interface uri='http://example.com/lib1.xml'>
<name>lib1</name>
<implementation id='l1' version='1'/>
</interface>
<interface uri='http://example.com/lib2.xml'>
<name>lib2</name>
<implementation id='l2' version='1'/>
</interface>
<interface uri='http://example.com/prog.xml'>
<name>0install</name>
<implementation id='v1' version='1'>
<command name='run' path='main'/>
<requires interface='http://example.com/lib1.xml' distribution='foo' importance='recommended'/>
<requires interface='http://example.com/lib2.xml' distribution='foo 0install' importance='recommended'/>
</implementation>
</interface>
<requirements command='run' interface='http://example.com/prog.xml'/>
<selections source="false" command="run" interface="http://example.com/prog.xml">
<selection id='l2' interface='http://example.com/lib2.xml' mode='immediate' version='1'/>
<selection id='v1' interface='http://example.com/prog.xml' mode='immediate' version='1'>
<command name="run" path="main"/>
<requires interface='http://example.com/lib1.xml' distribution='foo' importance='recommended'/>
<requires interface='http://example.com/lib2.xml' distribution='foo 0install' importance='recommended'/>
</selection>
</selections>
<!-- Make optional deps required?
<justification interface='http://example.com/lib1.xml' id='l1'>foo</justification> -->
</test>
<!-- We can have either the latest lib1 or the latest lib2 but not both.
We give priority to lib1, because it's listed first in prog's dependencies. -->
<test name='priority' add-downloads='true'>
<interface uri='http://example.com/lib1.xml'>
<name>lib1</name>
<implementation id='l11' version='1'/>
<implementation id='l12' version='2'>
<restricts interface='http://example.com/lib2.xml' version='1'/>
</implementation>
</interface>
<interface uri='http://example.com/lib2.xml'>
<name>lib2</name>
<implementation id='l21' version='1'/>
<implementation id='l22' version='2'>
<restricts interface='http://example.com/lib1.xml' version='1'/>
</implementation>
</interface>
<interface uri='http://example.com/prog.xml'>
<name>prog</name>
<group>
<command name="run" path="main"/>
<implementation id='p1' version='1'>
<requires interface='http://example.com/lib1.xml'/>
<requires interface='http://example.com/lib2.xml'/>
</implementation>
</group>
</interface>
<requirements command='run' interface='http://example.com/prog.xml'/>
<selections source="false" command="run" interface="http://example.com/prog.xml">
<selection id='l12' interface='http://example.com/lib1.xml' mode='immediate' version='2'/>
<selection id='l21' interface='http://example.com/lib2.xml' mode='immediate' version='1'/>
<selection id='p1' interface='http://example.com/prog.xml' mode='immediate' version='1'>
<command name="run" path="main"/>
<requires interface='http://example.com/lib1.xml'/>
<requires interface='http://example.com/lib2.xml'/>
</selection>
</selections>
<justification interface='http://example.com/lib2.xml' id='l22'>
http://example.com/lib2.xml 2 is selectable, but using it would produce a less optimal solution overall.
The changes would be:
http://example.com/lib1.xml: 2 to 1
</justification>
</test>
<!-- No implementations -->
<test name='no-impls'>
<requirements interface='http://localhost/top.xml' fails='true'/>
<problem>
Can't find all required implementations:
- http://localhost/top.xml -> (problem)
No known implementations at all
</problem>
</test>
<!-- No retrieval method -->
<test name='no-retrieval-method'>
<interface uri='http://localhost/top.xml'><name>Top</name><summary>Top</summary><group>
<implementation version='1' id='1'><requires interface='http://localhost/diagnostics.xml'/></implementation>
</group></interface>
<requirements interface='http://localhost/top.xml' fails='true'/>
<problem>
Can't find all required implementations:
- http://localhost/top.xml -> (problem)
No usable implementations:
1 (1): No retrieval methods
</problem>
</test>
<!-- No run command -->
<test name='no-run'>
<interface uri='http://localhost/top.xml'><name>Top</name><summary>Top</summary><group>
<implementation version='1' id='1'>
<archive href='http://localhost:3000/foo.tgz' size='100'/>
<requires interface='http://localhost/diagnostics.xml'>
<version not-before='100'/>
</requires>
</implementation>
</group>
</interface>
<requirements interface='http://localhost/top.xml' fails='true' command='run'/>
<problem>
Can't find all required implementations:
- http://localhost/top.xml -> (problem)
Rejected candidates:
1 (1): No run command
</problem>
</test>
<!-- Missing command from dependency -->
<test name='missing-dep-command'>
<requirements interface='http://localhost/top.xml' fails='true' command='run'/>
<interface uri='http://localhost/top.xml'><name>Top</name><summary>Top</summary><group><implementation version='1' id='1' main='foo'>
<archive href='http://localhost:3000/foo.tgz' size='100'/>
<requires interface='http://localhost/diagnostics.xml'>
<binding command='foo'/>
</requires>
</implementation>
</group>
</interface>
<interface uri='http://localhost/diagnostics.xml'><name>Diagnostics</name><summary>Diagnostics</summary><group>
<implementation version='5' id='diag-5'>
<archive href='http://localhost:3000/diag.tgz' size='100'/>
</implementation>
</group></interface>
<problem>
Can't find all required implementations:
- http://localhost/diagnostics.xml -> (problem)
http://localhost/top.xml 1 requires 'foo' command
Rejected candidates:
diag-5 (5): No foo command
- http://localhost/top.xml -> 1 (1)
</problem>
</test>
<!-- Failing distribution requirement -->
<test name='failing-distro-req'>
<requirements interface='http://localhost/top.xml' fails='true' command='run'/>
<interface uri='http://localhost/top.xml'><name>Top</name><summary>Top</summary><group><implementation version='1' id='1' main='foo'>
<archive href='http://localhost:3000/foo.tgz' size='100'/>
<requires interface='http://localhost/diagnostics.xml' distribution='foo'/>
</implementation>
</group>
</interface>
<interface uri='http://localhost/diagnostics.xml'><name>Diagnostics</name><summary>Diagnostics</summary><group>
<implementation version='5' id='diag-5'>
<archive href='http://localhost:3000/diag.tgz' size='100'/>
</implementation>
</group></interface>
<problem>
Can't find all required implementations:
- http://localhost/diagnostics.xml -> (problem)
http://localhost/top.xml 1 requires distribution:foo
Rejected candidates:
diag-5 (5): Incompatible with restriction: distribution:foo
- http://localhost/top.xml -> 1 (1)
</problem>
</test>
<!-- Failing version requirement on library -->
<test name='bad-dep-version'>
<requirements interface='http://localhost/top.xml' fails='true' command='run'/>
<interface uri='http://localhost/top.xml'><name>Top</name><summary>Top</summary><group><implementation version='1' id='1' main='foo'>
<archive href='http://localhost:3000/foo.tgz' size='100'/>
<requires interface='http://localhost/diagnostics.xml' version='100..!200'/>
</implementation>
</group>
</interface>
<interface uri='http://localhost/diagnostics.xml'><name>Diagnostics</name><summary>Diagnostics</summary><group>
<implementation version='5' id='diag-5'>
<archive href='http://localhost:3000/diag.tgz' size='100'/>
</implementation>
</group></interface>
<problem>
Can't find all required implementations:
- http://localhost/diagnostics.xml -> (problem)
http://localhost/top.xml 1 requires version 100..!200
Rejected candidates:
diag-5 (5): Incompatible with restriction: version 100..!200
- http://localhost/top.xml -> 1 (1)
</problem>
</test>
<!-- Failing version requires on root -->
<test name='failing-requires-root'>
<requirements interface='http://localhost/top.xml' fails='true' command='run'/>
<interface uri='http://localhost/top.xml'><name>Top</name><summary>Top</summary><group><implementation version='1' id='1' main='foo'>
<archive href='http://localhost:3000/foo.tgz' size='100'/>
<requires interface='http://localhost/diagnostics.xml'/>
</implementation>
</group>
</interface>
<interface uri='http://localhost/diagnostics.xml'><name>Diagnostics</name><summary>Diagnostics</summary><group>
<implementation version='5' id='diag-5'>
<archive href='http://localhost:3000/diag.tgz' size='100'/>
<restricts interface='http://localhost/top.xml' version='100..!200'/>
</implementation>
</group>
</interface>
<problem>
Can't find all required implementations:
- http://localhost/diagnostics.xml -> (problem)
Rejected candidates:
diag-5 (5): Requires http://localhost/top.xml version 100..!200
- http://localhost/top.xml -> 1 (1)
</problem>
</test>
<!-- Parse error in version restriction -->
<test name='bad-version-expr'>
<suppress-warnings/>
<requirements interface='http://localhost/top.xml' fails='true' command='run'/>
<interface uri='http://localhost/top.xml'><name>Top</name><summary>Top</summary><group><implementation version='1' id='1' main='foo'>
<archive href='http://localhost:3000/foo.tgz' size='100'/>
<requires interface='http://localhost/diagnostics.xml' version='100..200'/>
</implementation>
</group>
</interface>
<interface uri='http://localhost/diagnostics.xml'><name>Diagnostics</name><summary>Diagnostics</summary><group>
<implementation version='5' id='diag-5'>
<archive href='http://localhost:3000/diag.tgz' size='100'/>
</implementation>
</group></interface>
<problem>
Can't find all required implementations:
- http://localhost/diagnostics.xml -> (problem)
http://localhost/top.xml 1 requires <impossible: Can't parse version restriction '100..200': End of range must be exclusive (use '..!200', not '..200')>
Rejected candidates:
diag-5 (5): Incompatible with restriction: <impossible: Can't parse version restriction '100..200': End of range must be exclusive (use '..!200', not '..200')>
- http://localhost/top.xml -> 1 (1)
</problem>
</test>
<!-- Old-style version restriction -->
<test name='old-version-restrictions'>
<requirements interface='http://localhost/top.xml' fails='true' command='run'/>
<interface uri='http://localhost/top.xml'><name>Top</name><summary>Top</summary><group><implementation version='1' id='1' main='foo'>
<archive href='http://localhost:3000/foo.tgz' size='100'/>
<requires interface='http://localhost/diagnostics.xml'>
<version not-before='100'/>
</requires>
</implementation>
</group>
</interface>
<interface uri='http://localhost/diagnostics.xml'><name>Diagnostics</name><summary>Diagnostics</summary><group>
<implementation version='5' id='diag-5'>
<archive href='http://localhost:3000/diag.tgz' size='100'/>
</implementation>
</group></interface>
<problem>
Can't find all required implementations:
- http://localhost/diagnostics.xml -> (problem)
http://localhost/top.xml 1 requires version 100..
Rejected candidates:
diag-5 (5): Incompatible with restriction: version 100..
- http://localhost/top.xml -> 1 (1)
</problem>
</test>
<!-- Mismatched machine types -->
<test name='mismatched-machine-types'>
<requirements interface='http://localhost/top.xml' fails='true' command='run' os='Windows'/>
<interface uri='http://localhost/top.xml'><name>Top</name><summary>Top</summary><group><group>
<requires interface='http://localhost/diagnostics.xml'/>
<implementation version='1' id='1' main='foo' arch='Windows-i486'>
<archive href='http://localhost:3000/foo.tgz' size='100'/>
</implementation>
</group>
</group>
</interface>
<interface uri='http://localhost/diagnostics.xml'><name>Diagnostics</name><summary>Diagnostics</summary>
<group>
<implementation version='5' id='diag-5' arch='Windows-x86_64'>
<archive href='http://localhost:3000/diag.tgz' size='100'/>
</implementation>
</group>
</interface>
<problem>
Can't find all required implementations:
- http://localhost/diagnostics.xml -> (problem)
Rejected candidates:
diag-5 (5): Can't use x86_64 with selection of http://localhost/top.xml (i486)
- http://localhost/top.xml -> 1 (1)
</problem>
</test>
<!-- Only show the first five unusable reasons -->
<test name='limit-unusable'>
<requirements interface='http://localhost/top.xml' fails='true' command='run'/>
<interface uri='http://localhost/top.xml'><name>Top</name><summary>Top</summary><group><group>
<requires interface='http://localhost/diagnostics.xml'/>
<implementation version='1' id='1' main='foo'>
<archive href='http://localhost:3000/foo.tgz' size='100'/>
</implementation>
</group>
</group>
</interface>
<interface uri='http://localhost/diagnostics.xml'><name>Diagnostics</name><summary>Diagnostics</summary><group>
<group>
<implementation version='1' id='diag-1'/>
<implementation version='2' id='diag-2'/>
<implementation version='3' id='diag-3'/>
<implementation version='4' id='diag-4'/>
<implementation version='5' id='diag-5'/>
<implementation version='6' id='diag-6'/>
</group>
</group></interface>
<problem>
Can't find all required implementations:
- http://localhost/diagnostics.xml -> (problem)
No usable implementations:
diag-6 (6): No retrieval methods
diag-5 (5): No retrieval methods
diag-4 (4): No retrieval methods
diag-3 (3): No retrieval methods
diag-2 (2): No retrieval methods
...
- http://localhost/top.xml -> 1 (1)
</problem>
</test>
<!-- Only show the first five rejection reasons -->
<test name='limit-rejections'>
<requirements interface='http://localhost/top.xml' fails='true' command='run' os='Windows' machine='x86_64'/>
<interface uri='http://localhost/top.xml'><name>Top</name><summary>Top</summary><group><group>
<requires interface='http://localhost/diagnostics.xml'>
<version before='6'/>
</requires>
<implementation version='1' id='1' main='foo' arch='Windows-i486'>
<archive href='http://localhost:3000/foo.tgz' size='100'/>
</implementation>
</group>
</group>
</interface>
<interface uri='http://localhost/diagnostics.xml'><name>Diagnostics</name><summary>Diagnostics</summary><group>
<group>
<implementation version='5' id='diag-5' arch='Windows-x86_64'>
<archive href='http://localhost:3000/diag.tgz' size='100'/>
</implementation>
<implementation version='6' id='diag-6' arch='Windows-i486'>
<archive href='http://localhost:3000/diag.tgz' size='100'/>
</implementation>
{others}
</group>
</group>
</interface>
<interface uri='http://localhost/diagnostics.xml'><name>Diagnostics</name><summary>Diagnostics</summary><group>
<implementation version='0' id='diag-0' arch='Windows-x86_64'><archive href='http://localhost:3000/diag.tgz' size='100'/></implementation>
<implementation version='1' id='diag-1' arch='Windows-x86_64'><archive href='http://localhost:3000/diag.tgz' size='100'/></implementation>
<implementation version='2' id='diag-2' arch='Windows-x86_64'><archive href='http://localhost:3000/diag.tgz' size='100'/></implementation>
<implementation version='3' id='diag-3' arch='Windows-x86_64'><archive href='http://localhost:3000/diag.tgz' size='100'/></implementation>
<implementation version='4' id='diag-4' arch='Windows-x86_64'><archive href='http://localhost:3000/diag.tgz' size='100'/></implementation>
<implementation version='5' id='diag-5' arch='Windows-x86_64'><archive href='http://localhost:3000/diag.tgz' size='100'/></implementation>
</group></interface>
<problem>
Can't find all required implementations:
- http://localhost/diagnostics.xml -> (problem)
http://localhost/top.xml 1 requires version ..!6
Rejected candidates:
diag-5 (5): Can't use x86_64 with selection of http://localhost/top.xml (i486)
diag-4 (4): Can't use x86_64 with selection of http://localhost/top.xml (i486)
diag-3 (3): Can't use x86_64 with selection of http://localhost/top.xml (i486)
diag-2 (2): Can't use x86_64 with selection of http://localhost/top.xml (i486)
diag-1 (1): Can't use x86_64 with selection of http://localhost/top.xml (i486)
...
- http://localhost/top.xml -> 1 (1)
</problem>
<justification interface='http://localhost/diagnostics.xml' id='diag-5'>
There is no possible selection using http://localhost/diagnostics.xml 5.
Can't find all required implementations:
- http://localhost/diagnostics.xml -> (problem)
http://localhost/top.xml 1 requires version ..!6
Rejected candidates:
diag-5 (5): Can't use x86_64 with selection of http://localhost/top.xml (i486)
- http://localhost/top.xml -> 1 (1)
</justification>
</test>
<!-- Can't select old and diag because they conflict -->
<test name='replacements-conflict'>
<requirements interface='http://localhost/top.xml' fails='true' command='run' os='Windows' machine='x86_64'/>
<interface uri='http://localhost/top.xml'><name>Top</name><summary>Top</summary><group>
<requires interface='http://localhost/diagnostics.xml'/>
<requires interface='http://localhost/diagnostics-old.xml'/>
<implementation version='1' id='1' main='foo'>
<archive href='http://localhost:3000/foo.tgz' size='100'/>
</implementation>
</group>
</interface>
<interface uri="http://localhost/diagnostics-old.xml">
<name>Old</name><summary>Old</summary><feed src='http://localhost/diagnostics.xml'/>
<replaced-by interface='http://localhost/diagnostics.xml'/>
</interface>""".format(diag = diag_uri, old = old_uri).encode("utf-8")))
<interface uri='http://localhost/diagnostics.xml'><name>Diagnostics</name><summary>Diagnostics</summary><group>
<group>
<implementation version='5' id='diag-5'>
<archive href='http://localhost:3000/diag.tgz' size='100'/>
</implementation>
</group>
</group></interface>
<problem>
Can't find all required implementations:
- http://localhost/diagnostics-old.xml -> (problem)
Replaced by (and therefore conflicts with) http://localhost/diagnostics.xml
Rejected candidates:
diag-5 (5): Conflicts with http://localhost/diagnostics.xml
- http://localhost/diagnostics.xml -> 5 (diag-5)
Replaces (and therefore conflicts with) http://localhost/diagnostics-old.xml
- http://localhost/top.xml -> 1 (1)
</problem>
</test>
<test name='decide-bug'>
<interface uri="http://gfxmonk.net/dist/0install/watchdog.xml">
<name>watchdog</name>
<summary>Cross-platform filesystem monitoring for python</summary>
<homepage>https://github.com/gorakhargosh/watchdog</homepage>
<group main="watchdog/watchmedo.py">
<command name="test">
<runner interface="http://gfxmonk.net/dist/0install/nose.xml"/>
</command>
<implementation id="sha1new=32616e915c5ee25d835ed38421f15ebbe84b438f" released="2011-01-22" version="0.5.0">
<archive href="http://gfxmonk.net/dist/0install/watchdog/watchdog-0.5.0.tgz" size="83809"/>
</implementation>
<implementation id="sha1new=b6d40c5d38b58c1be359d879dadc90d212f9294c" released="2011-02-09" version="0.5.3">
<archive href="http://gfxmonk.net/dist/0install/watchdog/watchdog-0.5.3.tgz" size="83971"/>
</implementation>
<implementation id="." released="2011-02-09" version="0.5.3-pre"/>
</group>
</interface>
<interface uri="http://gfxmonk.net/dist/0install/nose.xml">
<name>nosetests</name>
<summary>is nicer testing for python</summary>
<group main="bin/nose">
<implementation id="sha1new=9e367bae00e50616d6b612e94713616a7fb5af4d" main="bin/nosetests" released="2010-07-19" version="0.11.2">
<archive extract="nose-0.11.2" href="http://somethingaboutorange.com/mrl/projects/nose/nose-0.11.2.tar.gz" size="256587" type="application/x-compressed-tar"/>
</implementation>
</group>
</interface>
<requirements interface='http://gfxmonk.net/dist/0install/watchdog.xml' command='test'/>
<selections source="false" interface="http://gfxmonk.net/dist/0install/watchdog.xml" command="test">
<selection id="sha1new=9e367bae00e50616d6b612e94713616a7fb5af4d"
interface="http://gfxmonk.net/dist/0install/nose.xml" released="2010-07-19" mode='immediate' version="0.11.2">
<command name="run" path="bin/nosetests"/>
</selection>
<selection id="sha1new=b6d40c5d38b58c1be359d879dadc90d212f9294c"
interface="http://gfxmonk.net/dist/0install/watchdog.xml" released="2011-02-09" mode='immediate' version="0.5.3">
<command name="test">
<runner interface="http://gfxmonk.net/dist/0install/nose.xml"/>
</command>
</selection>
</selections>
</test>
<test name='optional-missing'>
<interface local-path="OptionalMissing.xml">>
<name>OptionalMissing</name>
<summary>optional dependency on a missing interface</summary>
<group>
<requires interface="http://localhost/Missing.xml" importance='recommended'/>
<!-- a feed with multiple possibilities -->
<requires interface="http://foo/Binary.xml"/>
<implementation id="a" local-path='.' version="0.1" main='.'/>
</group>
</interface>
<import-interface from-python='Binary.xml'/>
<requirements interface='./OptionalMissing.xml'/>
<selections source="false" interface="/root/OptionalMissing.xml">
<selection id="a" interface="/root/OptionalMissing.xml" local-path="/root" mode='immediate' version="0.1">
<requires interface="http://localhost/Missing.xml" importance="recommended"/>
<requires interface="http://foo/Binary.xml"/>
</selection>
<selection id="sha1=3ce644dc725f1d21cfcf02562c76f375944b266a" interface="http://foo/Binary.xml" mode='immediate' version="1.0"/>
</selections>
</test>
<test name='optional-missing-command'>
<interface local-path="OptionalMissing.xml">>
<name>OptionalMissing</name>
<summary>optional command dependency on a missing interface</summary>
<group>
<requires interface="http://localhost/Missing.xml" importance='recommended'>
<executable-in-path name='missing'/>
</requires>
<implementation id="a" local-path='.' version="0.1" main='.'/>
</group>
</interface>
<requirements interface='./OptionalMissing.xml'/>
<selections source="false" interface="/root/OptionalMissing.xml">
<selection id="a" interface="/root/OptionalMissing.xml" local-path="/root" mode='immediate' version="0.1">
<requires interface="http://localhost/Missing.xml" importance="recommended">
<executable-in-path name='missing'/>
</requires>
</selection>
</selections>
</test>
<test name='feed-bug'>
<import-interface from-python="Build.xml"/>
<import-interface from-python="Compiler.xml"/>
<import-interface from-python="Compiler-new.xml"/>
<requirements interface='http://foo/Build.xml' command='run'/>
<selections source="false" interface='http://foo/Build.xml' command='run'>
<selection id="2" interface='http://foo/Build.xml' mode='immediate' version='2'>
<command name="run" path="idontexist"/>
<requires interface="http://foo/Compiler-new.xml"/>
<manifest-digest sha256new="def"/>
</selection>
<selection from-feed="http://foo/Compiler.xml" id="sha1=999" interface="http://foo/Compiler-new.xml" mode='immediate' version="5"/>
</selections>
</test>
<test name='replaced-conflicts'>
<import-interface from-python="Hello"/>
<import-interface from-python="Replaced.xml"/>
<import-interface from-python="ReplacedConflicts.xml"/>
<requirements interface='./ReplacedConflicts.xml' command='run'/>
<selections source="false" interface="/root/ReplacedConflicts.xml" command="run">
<selection id="b" interface="/root/ReplacedConflicts.xml" local-path="/root" mode='immediate' version="2">
<command name="run" path="missing"/>
<requires interface="http://localhost:8000/Hello"/>
</selection>
<selection id="sha1=3ce644dc725f1d21cfcf02562c76f375944b266a" interface="http://localhost:8000/Hello" mode='immediate' version="1"/>
</selections>
</test>
<test name='extra-restrictions'>
<import-interface from-python="Hello"/>
<import-interface from-python="Replaced.xml"/>
<import-interface from-python="ReplacedConflicts.xml"/>
<requirements interface='./ReplacedConflicts.xml' command='run'>
<restricts interface='/root/ReplacedConflicts.xml' version='..!2'/>
</requirements>
<selections source="false" interface="/root/ReplacedConflicts.xml" command="run">
<selection id="." interface="/root/Replaced.xml" mode='immediate' version="0" local-path='/root'/>
<selection id="a" interface="/root/ReplacedConflicts.xml" local-path="/root" mode='immediate' version="1">
<command name="run" path="missing"/>
<requires interface="/root/Replaced.xml"/>
</selection>
</selections>
</test>
<test name='src-dependency'>
<interface local-path="program.xml">
<name>Compiler</name>
<summary>A compiler than can compile itself</summary>
<implementation id="src" version="2.0" arch='*-src' local-path='.'>
<requires interface='./lib.xml' source='true' />
<command name='compile' path='build.sh'/>
</implementation>
</interface>
<interface local-path="lib.xml">
<name>lib</name>
<summary>A lib provided as both src and binary</summary>
<implementation id="lib-bin" version="1.0" local-path='.'/>
<implementation id="lib-src" version="1.0" arch='*-src' local-path='.'/>
</interface>
<requirements interface='./program.xml' command='compile' source='true'/>
<selections interface='/root/program.xml' command='compile' source='true'>
<selection id="lib-src" interface='/root/lib.xml' mode='immediate' version='1.0' local-path='/root' arch='*-src'/>
<selection id="src" interface='/root/program.xml' mode='immediate' version='2.0' local-path='/root' arch='*-src'>
<command name="compile" path="build.sh"/>
<requires interface="/root/lib.xml" source='true'/>
</selection>
</selections>
</test>
<test name='test-and-run'>
<interface local-path="prog.xml">
<name>prog</name>
<summary>unit-tests need self</summary>
<implementation id="." version='1'>
<command name='run' path='prog.py'/>
<command name='foo' path='foo.py'/>
<command name='test'>
<executable-in-path name='prog'/>
</command>
<executable-in-path name='prog-foo' command='foo'/>
</implementation>
</interface>
<requirements interface='./prog.xml' command='test'/>
<selections source="false" interface="/root/prog.xml" command="test">
<selection interface="/root/prog.xml" mode='immediate' version='1' id='.' local-path='/root'>
<command name='foo' path='foo.py'/>
<command name='run' path='prog.py'/>
<command name="test">
<executable-in-path name="prog"/>
</command>
<executable-in-path command="foo" name="prog-foo"/>
</selection>
</selections>
</test>
<test name='self-deps'>
<interface local-path="prog.xml">
<name>prog</name>
<summary>unit-tests need self</summary>
<implementation id="." version='1'>
<command name='run' path='prog.py'>
<requires interface='./lib1.xml' importance='recommended'/>
</command>
<command name='foo' path='foo.py'>
<requires interface='./lib2.xml' importance='recommended'/>
</command>
<command name='test'>
<executable-in-path name='prog'/>
</command>
<executable-in-path name='prog-foo' command='foo'/>
</implementation>
</interface>
<interface local-path="lib1.xml">
<name>lib1</name>
<summary>lib1</summary>
<implementation id='old' version='1.0' local-path='.'/>
<implementation id='new' version='2.0' local-path='.'/>
</interface>
<interface local-path="lib2.xml">
<name>lib2</name>
<summary>lib2</summary>
<implementation id='old' version='1.0' local-path='.'/>
<implementation id='new' version='2.0' local-path='.'/>
</interface>
<requirements interface='./prog.xml' command='test'/>
<selections source="false" interface="/root/prog.xml" command="test">
<selection interface="/root/lib1.xml" mode='immediate' version='2.0' id='new' local-path='/root'/>
<selection interface="/root/lib2.xml" mode='immediate' version='2.0' id='new' local-path='/root'/>
<selection interface="/root/prog.xml" mode='immediate' version='1' id='.' local-path='/root'>
<command name='foo' path='foo.py'>
<requires interface="/root/lib2.xml" importance='recommended'/>
</command>
<command name='run' path='prog.py'>
<requires interface="/root/lib1.xml" importance='recommended'/>
</command>
<command name="test">
<executable-in-path name="prog"/>
</command>
<executable-in-path command="foo" name="prog-foo"/>
</selection>
</selections>
</test>
<test name='self-deps-diag'>
<interface local-path="prog.xml">
<name>prog</name>
<summary>self-commands not available</summary>
<implementation id="." version='1'>
<command name='test'>
<executable-in-path name='p1' command='missing-1'/>
</command>
<executable-in-path name='p2' command='missing-2'/>
</implementation>
</interface>
<requirements fails='true' interface='./prog.xml' command='test'/>
<problem>
Can't find all required implementations:
- /root/prog.xml -> (problem)
Rejected candidates:
. (1): No missing-2 command
</problem>
</test>
<test name='self-compile'>
<interface local-path="Compiler.xml">
<name>Compiler</name>
<summary>A compiler than can compile itself</summary>
<implementation id="bin" version="1.0" local-path='.'/>
<implementation id="src" version="2.0" arch='*-src' local-path='.'>
<requires interface='./Compiler.xml'/>
<command name='compile' path='build.sh'/>
</implementation>
</interface>
<requirements interface='./Compiler.xml' command='compile' source='true'/>
<selections interface='/root/Compiler.xml' command='compile' source='true'>
<selection id="bin" interface='/root/Compiler.xml' mode='immediate' version='1.0' local-path='/root'/>
<selection id="src" interface='/root/Compiler.xml' mode='immediate' version='2.0' local-path='/root' arch='*-src'>
<command name="compile" path="build.sh"/>