summaryrefslogtreecommitdiff
path: root/doc/gen/libsolv-bindings.3
blob: 7384d2a63e091d528c7d6589c8bcbbffbfa8a15f (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
'\" t
.\"     Title: Libsolv-Bindings
.\"    Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 11/18/2020
.\"    Manual: LIBSOLV
.\"    Source: libsolv
.\"  Language: English
.\"
.TH "LIBSOLV\-BINDINGS" "3" "11/18/2020" "libsolv" "LIBSOLV"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
libsolv-bindings \- access libsolv from perl/python/ruby
.SH "DESCRIPTION"
.sp
Libsolv\(cqs language bindings offer an abstract, object orientated interface to the library\&. The supported languages are currently perl, python, and ruby\&. All example code (except in the specifics sections, of course) lists first the \(lqC\-ish\(rq interface, then the syntax for perl, python, and ruby (in that order)\&.
.SH "PERL SPECIFICS"
.sp
Libsolv\(cqs perl bindings can be loaded with the following statement:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBuse solv\fR;
.fi
.if n \{\
.RE
.\}
.sp
Objects are either created by calling the new() method on a class or they are returned by calling methods on other objects\&.
.sp
.if n \{\
.RS 4
.\}
.nf
my \fI$pool\fR \fB= solv::Pool\->new()\fR;
my \fI$repo\fR \fB=\fR \fI$pool\fR\fB\->add_repo("my_first_repo")\fR;
.fi
.if n \{\
.RE
.\}
.sp
Swig encapsulates all objects as tied hashes, thus the attributes can be accessed by treating the object as standard hash reference:
.sp
.if n \{\
.RS 4
.\}
.nf
\fI$pool\fR\fB\->{appdata} = 42\fR;
\fBprintf "appdata is %d\en",\fR \fI$pool\fR\fB\->{appdata}\fR;
.fi
.if n \{\
.RE
.\}
.sp
A special exception to this are iterator objects, they are encapsulated as tied arrays so that it is possible to iterate with a for() statement:
.sp
.if n \{\
.RS 4
.\}
.nf
my \fI$iter\fR \fB=\fR \fI$pool\fR\fB\->solvables_iter()\fR;
\fBfor my\fR \fI$solvable\fR \fB(\fR\fI@$iter\fR\fB) { \&.\&.\&. }\fR;
.fi
.if n \{\
.RE
.\}
.sp
As a downside of this approach, iterator objects cannot have attributes\&.
.sp
If an array needs to be passed to a method it is usually done by reference, if a method returns an array it returns it on the perl stack:
.sp
.if n \{\
.RS 4
.\}
.nf
my \fI@problems\fR \fB=\fR \fI$solver\fR\fB\->solve(\e\fR\fI@jobs\fR\fB)\fR;
.fi
.if n \{\
.RE
.\}
.sp
Due to a bug in swig, stringification does not work for libsolv\(cqs objects\&. Instead, you have to call the object\(cqs str() method\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBprint\fR \fI$dep\fR\fB\->str() \&. "\e\fR\fIn\fR\fB"\fR;
.fi
.if n \{\
.RE
.\}
.sp
Swig implements all constants as numeric variables (instead of the more natural constant subs), so don\(cqt forget the leading \(lq$\(rq when accessing a constant\&. Also do not forget to prepend the namespace of the constant:
.sp
.if n \{\
.RS 4
.\}
.nf
\fI$pool\fR\fB\->set_flag($solv::Pool::POOL_FLAG_OBSOLETEUSESCOLORS, 1)\fR;
.fi
.if n \{\
.RE
.\}
.SH "PYTHON SPECIFICS"
.sp
The python bindings can be loaded with:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBimport solv\fR
.fi
.if n \{\
.RE
.\}
.sp
Objects are either created by calling the constructor method for a class or they are returned by calling methods on other objects\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fIpool\fR \fB= solv\&.Pool()\fR
\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.add_repo("my_first_repo")\fR
.fi
.if n \{\
.RE
.\}
.sp
Attributes can be accessed as usual:
.sp
.if n \{\
.RS 4
.\}
.nf
\fIpool\fR\fB\&.appdata = 42\fR
\fBprint "appdata is %d" % (\fR\fIpool\fR\fB\&.appdata)\fR
.fi
.if n \{\
.RE
.\}
.sp
Iterators also work as expected:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBfor\fR \fIsolvable\fR \fBin\fR \fIpool\fR\fB\&.solvables_iter():\fR
.fi
.if n \{\
.RE
.\}
.sp
Arrays are passed and returned as list objects:
.sp
.if n \{\
.RS 4
.\}
.nf
\fIjobs\fR \fB= []\fR
\fIproblems\fR \fB=\fR \fIsolver\fR\fB\&.solve(\fR\fIjobs\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
The bindings define stringification for many classes, some also have a \fIrepr\fR method to ease debugging\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBprint\fR \fIdep\fR
\fBprint repr(\fR\fIrepo\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Constants are attributes of the corresponding classes:
.sp
.if n \{\
.RS 4
.\}
.nf
\fIpool\fR\fB\&.set_flag(solv\&.Pool\&.POOL_FLAG_OBSOLETEUSESCOLORS, 1)\fR;
.fi
.if n \{\
.RE
.\}
.SH "RUBY SPECIFICS"
.sp
The ruby bindings can be loaded with:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBrequire \*(Aqsolv\*(Aq\fR
.fi
.if n \{\
.RE
.\}
.sp
Objects are either created by calling the new method on a class or they are returned by calling methods on other objects\&. Note that all classes start with an uppercase letter in ruby, so the class is called \(lqSolv\(rq\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fIpool\fR \fB= Solv::Pool\&.new\fR
\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.add_repo("my_first_repo")\fR
.fi
.if n \{\
.RE
.\}
.sp
Attributes can be accessed as usual:
.sp
.if n \{\
.RS 4
.\}
.nf
\fIpool\fR\fB\&.appdata = 42\fR
\fBputs "appdata is #{\fR\fIpool\fR\fB\&.appdata}"\fR
.fi
.if n \{\
.RE
.\}
.sp
Iterators also work as expected:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBfor\fR \fIsolvable\fR \fBin\fR \fIpool\fR\fB\&.solvables_iter() do \&.\&.\&.\fR
.fi
.if n \{\
.RE
.\}
.sp
Arrays are passed and returned as array objects:
.sp
.if n \{\
.RS 4
.\}
.nf
\fIjobs\fR \fB= []\fR
\fIproblems\fR \fB=\fR \fIsolver\fR\fB\&.solve(\fR\fIjobs\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Most classes define a to_s method, so objects can be easily stringified\&. Many also define an inspect() method\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBputs\fR \fIdep\fR
\fBputs\fR \fIrepo\fR\fB\&.inspect\fR
.fi
.if n \{\
.RE
.\}
.sp
Constants live in the namespace of the class they belong to:
.sp
.if n \{\
.RS 4
.\}
.nf
\fIpool\fR\fB\&.set_flag(Solv::Pool::POOL_FLAG_OBSOLETEUSESCOLORS, 1)\fR;
.fi
.if n \{\
.RE
.\}
.sp
Note that boolean methods have an added trailing \(lq?\(rq, to be consistent with other ruby modules:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBputs "empty" if\fR \fIrepo\fR\fB\&.isempty?\fR
.fi
.if n \{\
.RE
.\}
.SH "TCL SPECIFICS"
.sp
Libsolv\(cqs tcl bindings can be loaded with the following statement:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBpackage require solv\fR
.fi
.if n \{\
.RE
.\}
.sp
Objects are either created by calling class name prefixed with \(lqnew_\(rq, or they are returned by calling methods on other objects\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBset pool [solv::new_Pool]\fR
\fBset repo [\fR\fI$pool\fR \fBadd_repo "my_first_repo"]\fR
.fi
.if n \{\
.RE
.\}
.sp
Swig provides a \(lqcget\(rq method to read object attributes, and a \(lqconfigure\(rq method to write them:
.sp
.if n \{\
.RS 4
.\}
.nf
\fI$pool\fR \fBconfigure \-appdata 42\fR
\fBputs "appdata is [\fR\fI$pool\fR \fBcget \-appdata]"\fR
.fi
.if n \{\
.RE
.\}
.sp
The tcl bindings provide a little helper to work with iterators in a foreach style:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBset iter [\fR\fI$pool\fR \fBsolvables_iter]\fR
\fBsolv::iter s\fR \fI$iter\fR \fB{ \&.\&.\&. }\fR
.fi
.if n \{\
.RE
.\}
.sp
libsolv\(cqs arrays are mapped to tcl\(cqs lists:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBset jobs [list\fR \fI$job1 $job2\fR\fB]\fR
\fBset problems [\fR\fI$solver\fR \fBsolve\fR \fI$jobs\fR\fB]\fR
\fBputs "We have [llength\fR \fI$problems\fR\fB] problems\&.\&.\&."\fR
.fi
.if n \{\
.RE
.\}
.sp
Stringification is done by calling the object\(cqs \(lqstr\(rq method\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBputs [\fR\fI$dep\fR \fBstr]\fR
.fi
.if n \{\
.RE
.\}
.sp
There is one exception: you have to use \(lqstringify\(rq for Datamatch objects, as swig reports a clash with the \(lqstr\(rq attribute\&. Some objects also support a \(lq==\(rq method for equality tests, and a \(lq!=\(rq method\&.
.sp
Swig implements all constants as numeric variables, constants belonging to a libsolv class are prefixed with the class name:
.sp
.if n \{\
.RS 4
.\}
.nf
\fI$pool\fR \fBset_flag\fR \fI$solv::Pool_POOL_FLAG_OBSOLETEUSESCOLORS\fR \fB1\fR
\fBputs [\fR\fI$solvable\fR \fBlookup_str\fR \fI$solv::SOLVABLE_SUMMARY\fR\fB]\fR
.fi
.if n \{\
.RE
.\}
.SH "THE SOLV CLASS"
.sp
This is the main namespace of the library, you cannot create objects of this type but it contains some useful constants\&.
.SS "CONSTANTS"
.sp
Relational flag constants, the first three can be or\-ed together
.PP
\fBREL_LT\fR
.RS 4
the \(lqless than\(rq bit
.RE
.PP
\fBREL_EQ\fR
.RS 4
the \(lqequals to\(rq bit
.RE
.PP
\fBREL_GT\fR
.RS 4
the \(lqgreater than\(rq bit
.RE
.PP
\fBREL_ARCH\fR
.RS 4
used for relations that describe an extra architecture filter, the version part of the relation is interpreted as architecture\&.
.RE
.sp
Special Solvable Ids
.PP
\fBSOLVID_META\fR
.RS 4
Access the meta section of a repository or repodata area\&. This is like an extra Solvable that has the Id SOLVID_META\&.
.RE
.PP
\fBSOLVID_POS\fR
.RS 4
Use the data position stored inside of the pool instead of accessing some solvable by Id\&. The bindings have the Datapos objects as an abstraction mechanism, so you most likely do not need this constant\&.
.RE
.sp
Constant string Ids
.PP
\fBID_NULL\fR
.RS 4
Always zero
.RE
.PP
\fBID_EMPTY\fR
.RS 4
Always one, describes the empty string
.RE
.PP
\fBSOLVABLE_NAME\fR
.RS 4
The keyname Id of the name of the solvable\&.
.RE
.PP
\fB\&...\fR
.RS 4
see the libsolv\-constantids manpage for a list of fixed Ids\&.
.RE
.SH "THE POOL CLASS"
.sp
The pool is libsolv\(cqs central resource manager\&. A pool consists of Solvables, Repositories, Dependencies, each indexed by Ids\&.
.SS "CLASS METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBPool *Pool()\fR
my \fI$pool\fR \fB= solv::Pool\->new()\fR;
\fIpool\fR \fB= solv\&.Pool()\fR
\fIpool\fR \fB= Solv::Pool\&.new()\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a new pool instance\&. In most cases you just need one pool\&. Note that the returned object "owns" the pool, i\&.e\&. if the object is freed, the pool is also freed\&. You can use the disown method to break this ownership relation\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid *appdata;\fR                  /* read/write */
\fI$pool\fR\fB\->{appdata}\fR
\fIpool\fR\fB\&.appdata\fR
\fIpool\fR\fB\&.appdata\fR
.fi
.if n \{\
.RE
.\}
.sp
Application specific data that may be used in any way by the code using the pool\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable solvables[];\fR           /* read only */
my \fI$solvable\fR \fB=\fR \fI$pool\fR\fB\->{solvables}\->[\fR\fI$solvid\fR\fB]\fR;
\fIsolvable\fR \fB=\fR \fIpool\fR\fB\&.solvables[\fR\fIsolvid\fR\fB]\fR
\fIsolvable\fR \fB=\fR \fIpool\fR\fB\&.solvables[\fR\fIsolvid\fR\fB]\fR
.fi
.if n \{\
.RE
.\}
.sp
Look up a Solvable by its id\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRepo repos[];\fR                   /* read only */
my \fI$repo\fR \fB=\fR \fI$pool\fR\fB\->{repos}\->[\fR\fI$repoid\fR\fB]\fR;
\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.repos[\fR\fIrepoid\fR\fB]\fR
\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.repos[\fR\fIrepoid\fR\fB]\fR
.fi
.if n \{\
.RE
.\}
.sp
Look up a Repository by its id\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRepo *installed;\fR                /* read/write */
\fI$pool\fR\fB\->{installed} =\fR \fI$repo\fR;
\fIpool\fR\fB\&.installed =\fR \fIrepo\fR
\fIpool\fR\fB\&.installed =\fR \fIrepo\fR
.fi
.if n \{\
.RE
.\}
.sp
Define which repository contains all the installed packages\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *errstr;\fR             /* read only */
my \fI$err\fR \fB=\fR \fI$pool\fR\fB\->{errstr}\fR;
\fIerr\fR \fB=\fR \fIpool\fR\fB\&.errstr\fR
\fIerr\fR \fB=\fR \fIpool\fR\fB\&.errstr\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the last error string that was stored in the pool\&.
.SS "CONSTANTS"
.PP
\fBPOOL_FLAG_PROMOTEEPOCH\fR
.RS 4
Promote the epoch of the providing dependency to the requesting dependency if it does not contain an epoch\&. Used at some time in old rpm versions, modern systems should never need this\&.
.RE
.PP
\fBPOOL_FLAG_FORBIDSELFCONFLICTS\fR
.RS 4
Disallow the installation of packages that conflict with themselves\&. Debian always allows self\-conflicting packages, rpm used to forbid them but switched to also allowing them since rpm\-4\&.9\&.0\&.
.RE
.PP
\fBPOOL_FLAG_OBSOLETEUSESPROVIDES\fR
.RS 4
Make obsolete type dependency match against provides instead of just the name and version of packages\&. Very old versions of rpm used the name/version, then it got switched to provides and later switched back again to just name/version\&.
.RE
.PP
\fBPOOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES\fR
.RS 4
An implicit obsoletes is the internal mechanism to remove the old package on an update\&. The default is to remove all packages with the same name, rpm\-5 switched to also removing packages providing the same name\&.
.RE
.PP
\fBPOOL_FLAG_OBSOLETEUSESCOLORS\fR
.RS 4
Rpm\(cqs multilib implementation distinguishes between 32bit and 64bit packages (the terminology is that they have a different color)\&. If obsoleteusescolors is set, packages with different colors will not obsolete each other\&.
.RE
.PP
\fBPOOL_FLAG_IMPLICITOBSOLETEUSESCOLORS\fR
.RS 4
Same as POOL_FLAG_OBSOLETEUSESCOLORS, but used to find out if packages of the same name can be installed in parallel\&. For current Fedora systems, POOL_FLAG_OBSOLETEUSESCOLORS should be false and POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS should be true (this is the default if FEDORA is defined when libsolv is compiled)\&.
.RE
.PP
\fBPOOL_FLAG_NOINSTALLEDOBSOLETES\fR
.RS 4
Since version 4\&.9\&.0 rpm considers the obsoletes of installed packages when checking for dependency conflicts, thus you may not install a package that is obsoleted by some other installed package unless you also erase the other package\&.
.RE
.PP
\fBPOOL_FLAG_HAVEDISTEPOCH\fR
.RS 4
Mandriva added a new field called distepoch that gets checked in version comparison if the epoch/version/release of two packages are the same\&.
.RE
.PP
\fBPOOL_FLAG_NOOBSOLETESMULTIVERSION\fR
.RS 4
If a package is installed in multiversion mode, rpm used to ignore both the implicit obsoletes and the obsolete dependency of a package\&. This was changed to ignoring just the implicit obsoletes, thus you may install multiple versions of the same name, but obsoleted packages still get removed\&.
.RE
.PP
\fBPOOL_FLAG_ADDFILEPROVIDESFILTERED\fR
.RS 4
Make the addfileprovides method only add files from the standard locations (i\&.e\&. the \(lqbin\(rq and \(lqetc\(rq directories)\&. This is useful if you have only few packages that use non\-standard file dependencies, but you still want the fast speed that addfileprovides() generates\&.
.RE
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid free()\fR
\fI$pool\fR\fB\->free()\fR;
\fIpool\fR\fB\&.free()\fR
\fIpool\fR\fB\&.free()\fR
.fi
.if n \{\
.RE
.\}
.sp
Force a free of the pool\&. After this call, you must not access any object that still references the pool\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid disown()\fR
\fI$pool\fR\fB\->disown()\fR;
\fIpool\fR\fB\&.disown()\fR
\fIpool\fR\fB\&.disown()\fR
.fi
.if n \{\
.RE
.\}
.sp
Break the ownership relation between the binding object and the pool\&. After this call, the pool will not get freed even if the object goes out of scope\&. This also means that you must manually call the free method to free the pool data\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid setdebuglevel(int\fR \fIlevel\fR\fB)\fR
\fI$pool\fR\fB\->setdebuglevel(\fR\fI$level\fR\fB)\fR;
\fIpool\fR\fB\&.setdebuglevel(\fR\fIlevel\fR\fB)\fR
\fIpool\fR\fB\&.setdebuglevel(\fR\fIlevel\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Set the debug level\&. A value of zero means no debug output, the higher the value, the more output is generated\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint set_flag(int\fR \fIflag\fR\fB, int\fR \fIvalue\fR\fB)\fR
my \fI$oldvalue\fR \fB=\fR \fI$pool\fR\fB\->set_flag(\fR\fI$flag\fR\fB,\fR \fI$value\fR\fB)\fR;
\fIoldvalue\fR \fB=\fR \fIpool\fR\fB\&.set_flag(\fR\fIflag\fR\fB,\fR \fIvalue\fR\fB)\fR
\fIoldvalue\fR \fB=\fR \fIpool\fR\fB\&.set_flag(\fR\fIflag\fR\fB,\fR \fIvalue\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint get_flag(int\fR \fIflag\fR\fB)\fR
my \fI$value\fR \fB=\fR \fI$pool\fR\fB\->get_flag(\fR\fI$flag\fR\fB)\fR;
\fIvalue\fR \fB=\fR \fIpool\fR\fB\&.get_flag(\fR\fIflag\fR\fB)\fR
\fIvalue\fR \fB=\fR \fIpool\fR\fB\&.get_flag(\fR\fIflag\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Set/get a pool specific flag\&. The flags define how the system works, e\&.g\&. how the package manager treats obsoletes\&. The default flags should be sane for most applications, but in some cases you may want to tweak a flag, for example if you want to solve package dependencies for some other system\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid set_rootdir(const char *\fR\fIrootdir\fR\fB)\fR
\fI$pool\fR\fB\->set_rootdir(\fR\fIrootdir\fR\fB)\fR;
\fIpool\fR\fB\&.set_rootdir(\fR\fIrootdir\fR\fB)\fR
\fIpool\fR\fB\&.set_rootdir(\fR\fIrootdir\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *get_rootdir()\fR
my \fI$rootdir\fR \fB=\fR \fI$pool\fR\fB\->get_rootdir()\fR;
\fIrootdir\fR \fB=\fR \fIpool\fR\fB\&.get_rootdir()\fR
\fIrootdir\fR \fB=\fR \fIpool\fR\fB\&.get_rootdir()\fR
.fi
.if n \{\
.RE
.\}
.sp
Set/get the rootdir to use\&. This is useful if you want package management to work only in some directory, for example if you want to setup a chroot jail\&. Note that the rootdir will only be prepended to file paths if the \fBREPO_USE_ROOTDIR\fR flag is used\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid setarch(const char *\fR\fIarch\fR \fB= 0)\fR
\fI$pool\fR\fB\->setarch()\fR;
\fIpool\fR\fB\&.setarch()\fR
\fIpool\fR\fB\&.setarch()\fR
.fi
.if n \{\
.RE
.\}
.sp
Set the architecture for your system\&. The architecture is used to determine which packages are installable\&. It defaults to the result of \(lquname \-m\(rq\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRepo add_repo(const char *\fR\fIname\fR\fB)\fR
\fI$repo\fR \fB=\fR \fI$pool\fR\fB\->add_repo(\fR\fI$name\fR\fB)\fR;
\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.add_repo(\fR\fIname\fR\fB)\fR
\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.add_repo(\fR\fIname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add a Repository with the specified name to the pool\&. The repository is empty on creation, use the repository methods to populate it with packages\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRepoiterator repos_iter()\fR
\fBfor my\fR \fI$repo\fR \fB(\fR\fI@\fR\fB{\fR\fI$pool\fR\fB\->repos_iter()})\fR
\fBfor\fR \fIrepo\fR \fBin\fR \fIpool\fR\fB\&.repos_iter():\fR
\fBfor\fR \fIrepo\fR \fBin\fR \fIpool\fR\fB\&.repos_iter()\fR
.fi
.if n \{\
.RE
.\}
.sp
Iterate over the existing repositories\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvableiterator solvables_iter()\fR
\fBfor my\fR \fI$solvable\fR \fB(\fR\fI@\fR\fB{\fR\fI$pool\fR\fB\->solvables_iter()})\fR
\fBfor\fR \fIsolvable\fR \fBin\fR \fIpool\fR\fB\&.solvables_iter():\fR
\fBfor\fR \fIsolvable\fR \fBin\fR \fIpool\fR\fB\&.solvables_iter()\fR
.fi
.if n \{\
.RE
.\}
.sp
Iterate over the existing solvables\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDep Dep(const char *\fR\fIstr\fR\fB, bool\fR \fIcreate\fR \fB= 1)\fR
my \fI$dep\fR \fB=\fR \fI$pool\fR\fB\->Dep(\fR\fI$string\fR\fB)\fR;
\fIdep\fR \fB=\fR \fIpool\fR\fB\&.Dep(\fR\fIstring\fR\fB)\fR
\fIdep\fR \fB=\fR \fIpool\fR\fB\&.Dep(\fR\fIstring\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create an object describing a string or dependency\&. If the string is currently not in the pool and \fIcreate\fR is false, \fBundef\fR/\fBNone\fR/\fBnil\fR is returned\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid addfileprovides()\fR
\fI$pool\fR\fB\->addfileprovides()\fR;
\fIpool\fR\fB\&.addfileprovides()\fR
\fIpool\fR\fB\&.addfileprovides()\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId *addfileprovides_queue()\fR
my \fI@ids\fR \fB=\fR \fI$pool\fR\fB\->addfileprovides_queue()\fR;
\fIids\fR \fB=\fR \fIpool\fR\fB\&.addfileprovides_queue()\fR
\fIids\fR \fB=\fR \fIpool\fR\fB\&.addfileprovides_queue()\fR
.fi
.if n \{\
.RE
.\}
.sp
Some package managers like rpm allow dependencies on files contained in other packages\&. To allow libsolv to deal with those dependencies in an efficient way, you need to call the addfileprovides method after creating and reading all repositories\&. This method will scan all dependency for file names and then scan all packages for matching files\&. If a filename has been matched, it will be added to the provides list of the corresponding package\&. The addfileprovides_queue variant works the same way but returns an array containing all file dependencies\&. This information can be stored in the meta section of the repositories to speed up the next time the repository is loaded and addfileprovides is called\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid createwhatprovides()\fR
\fI$pool\fR\fB\->createwhatprovides()\fR;
\fIpool\fR\fB\&.createwhatprovides()\fR
\fIpool\fR\fB\&.createwhatprovides()\fR
.fi
.if n \{\
.RE
.\}
.sp
Create the internal \(lqwhatprovides\(rq hash over all of the provides of all installable packages\&. This method must be called before doing any lookups on provides\&. It\(cqs encouraged to do it right after all repos are set up, usually right after the call to addfileprovides()\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *whatprovides(DepId\fR \fIdep\fR\fB)\fR
my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->whatprovides(\fR\fI$dep\fR\fB)\fR;
\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatprovides(\fR\fIdep\fR\fB)\fR
\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatprovides(\fR\fIdep\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Return all solvables that provide the specified dependency\&. You can use either a Dep object or a simple Id as argument\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *best_solvables(Solvable *\fR\fIsolvables\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->best_solvables(\fR\fI$solvables\fR\fB)\fR;
\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.best_solvables(\fR\fIsolvables\fR\fB)\fR
\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.best_solvables(\fR\fIsolvables\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Filter list of solvables by repo priority, architecture and version\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *whatcontainsdep(Id\fR \fIkeyname\fR\fB, DepId\fR \fIdep\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->whatcontainsdep(\fR\fI$keyname\fR\fB,\fR \fI$dep\fR\fB)\fR
\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatcontainsdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatcontainsdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Return all solvables for which keyname contains the dependency\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *whatmatchesdep(Id\fR \fIkeyname\fR\fB, DepId\fR \fIdep\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->whatmatchesdep(\fR\fI$keyname\fR\fB,\fR \fI$sdep\fR\fB)\fR
\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatmatchesdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatmatchesdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Return all solvables that have dependencies in keyname that match the dependency\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *whatmatchessolvable(Id\fR \fIkeyname\fR\fB, Solvable\fR \fIsolvable\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->whatmatchessolvable(\fR\fI$keyname\fR\fB,\fR \fI$solvable\fR\fB)\fR
\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatmatchessolvable(\fR\fIkeyname\fR\fB,\fR \fIsolvable\fR\fB)\fR
\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatmatchessolvable(\fR\fIkeyname\fR\fB,\fR \fIsolvable\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Return all solvables that match package dependencies against solvable\(cqs provides\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId *matchprovidingids(const char *\fR\fImatch\fR\fB, int\fR \fIflags\fR\fB)\fR
my \fI@ids\fR \fB=\fR \fI$pool\fR\fB\->matchprovidingids(\fR\fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
\fIids\fR \fB=\fR \fIpool\fR\fB\&.matchprovidingids(\fR\fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
\fIids\fR \fB=\fR \fIpool\fR\fB\&.matchprovidingids(\fR\fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Search the names of all provides and return the ones matching the specified string\&. See the Dataiterator class for the allowed flags\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId towhatprovides(Id *\fR\fIids\fR\fB)\fR
my \fI$offset\fR \fB=\fR \fI$pool\fR\fB\->towhatprovides(\e\fR\fI@ids\fR\fB)\fR;
\fIoffset\fR \fB=\fR \fIpool\fR\fB\&.towhatprovides(\fR\fIids\fR\fB)\fR
\fIoffset\fR \fB=\fR \fIpool\fR\fB\&.towhatprovides(\fR\fIids\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
\(lqInternalize\(rq an array containing Ids\&. The returned value can be used to create solver jobs working on a specific set of packages\&. See the Solver class for more information\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid set_namespaceproviders(DepId\fR \fIns\fR\fB, DepId\fR \fIevr\fR\fB, bool\fR \fIvalue\fR \fB= 1)\fR
\fI$pool\fR\fB\->set_namespaceproviders(\fR\fI$ns\fR\fB,\fR \fI$evr\fR\fB, 1)\fR;
\fIpool\fR\fB\&.set_namespaceproviders(\fR\fIns\fR\fB,\fR \fIevr\fR\fB,\fR \fITrue\fR\fB)\fR
\fIpool\fR\fB\&.set_namespaceproviders(\fR\fIns\fR\fB,\fR \fIevr\fR\fB,\fR \fItrue\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Manually set a namespace provides entry in the whatprovides index\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid flush_namespaceproviders(DepId\fR \fIns\fR\fB, DepId\fR \fIevr\fR\fB)\fR
\fI$pool\fR\fB\->flush_namespaceproviders(\fR\fI$ns\fR\fB,\fR \fI$evr\fR\fB)\fR;
\fI$pool\fR\fB\&.flush_namespaceproviders(\fR\fIns\fR\fB,\fR \fIevr\fR\fB)\fR
\fI$pool\fR\fB\&.flush_namespaceproviders(\fR\fIns\fR\fB,\fR \fIevr\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Flush the cache of all namespaceprovides matching the specified namespace dependency\&. You can use zero as a wildcard argument\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool isknownarch(DepId\fR \fIid\fR\fB)\fR
my \fI$bool\fR \fB=\fR \fI$pool\fR\fB\->isknownarch(\fR\fI$id\fR\fB)\fR;
\fIbool\fR \fB=\fR \fIpool\fR\fB\&.isknownarch(\fR\fIid\fR\fB)\fR
\fIbool\fR \fB=\fR \fIpool\fR\fB\&.isknownarch?(\fR\fIid\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Return true if the specified Id describes a known architecture\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolver Solver()\fR
my \fI$solver\fR \fB=\fR \fI$pool\fR\fB\->Solver()\fR;
\fIsolver\fR \fB=\fR \fIpool\fR\fB\&.Solver()\fR
\fIsolver\fR \fB=\fR \fIpool\fR\fB\&.Solver()\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a new solver object\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBJob Job(int\fR \fIhow\fR\fB, Id\fR \fIwhat\fR\fB)\fR
my \fI$job\fR \fB=\fR \fI$pool\fR\fB\->Job(\fR\fI$how\fR\fB,\fR \fI$what\fR\fB)\fR;
\fIjob\fR \fB=\fR \fIpool\fR\fB\&.Job(\fR\fIhow\fR\fB,\fR \fIwhat\fR\fB)\fR
\fIjob\fR \fB=\fR \fIpool\fR\fB\&.Job(\fR\fIhow\fR\fB,\fR \fIwhat\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a new Job object\&. Kind of low level, in most cases you would instead use a Selection or Dep job constructor\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSelection Selection()\fR
my \fI$sel\fR \fB=\fR \fI$pool\fR\fB\->Selection()\fR;
\fIsel\fR \fB=\fR \fIpool\fR\fB\&.Selection()\fR
\fIsel\fR \fB=\fR \fIpool\fR\fB\&.Selection()\fR
.fi
.if n \{\
.RE
.\}
.sp
Create an empty selection\&. Useful as a starting point for merging other selections\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSelection Selection_all()\fR
my \fI$sel\fR \fB=\fR \fI$pool\fR\fB\->Selection_all()\fR;
\fIsel\fR \fB=\fR \fIpool\fR\fB\&.Selection_all()\fR
\fIsel\fR \fB=\fR \fIpool\fR\fB\&.Selection_all()\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a selection containing all packages\&. Useful as starting point for intersecting other selections or for update/distupgrade jobs\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSelection select(const char *\fR\fIname\fR\fB, int\fR \fIflags\fR\fB)\fR
my \fI$sel\fR \fB=\fR \fI$pool\fR\fB\->select(\fR\fI$name\fR\fB,\fR \fI$flags\fR\fB)\fR;
\fIsel\fR \fB=\fR \fIpool\fR\fB\&.select(\fR\fIname\fR\fB,\fR \fIflags\fR\fB)\fR
\fIsel\fR \fB=\fR \fIpool\fR\fB\&.select(\fR\fIname\fR\fB,\fR \fIflags\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a selection by matching packages against the specified string\&. See the Selection class for a list of flags and how to create solver jobs from a selection\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSelection matchdeps(const char *\fR\fIname\fR\fB, int\fR \fIflags\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
my \fI$sel\fR \fB=\fR \fI$pool\fR\fB\->matchdeps(\fR\fI$name\fR\fB,\fR \fI$flags\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIsel\fR \fB=\fR \fIpool\fR\fB\&.matchdeps(\fR\fIname\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIsel\fR \fB=\fR \fIpool\fR\fB\&.matchdeps(\fR\fIname\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a selection by matching package dependencies against the specified string\&. This can be used if you want to match other dependency types than \(lqprovides\(rq\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSelection matchdepid(DepId\fR \fIdep\fR\fB, int\fR \fIflags\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
my \fI$sel\fR \fB=\fR \fI$pool\fR\fB\->matchdepid(\fR\fI$dep\fR\fB,\fR \fI$flags\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIsel\fR \fB=\fR \fIpool\fR\fB\&.matchdepid(\fR\fIdep\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIsel\fR \fB=\fR \fIpool\fR\fB\&.matchdepid(\fR\fIdep\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a selection by matching package dependencies against the specified dependency\&. This may be faster than matchdeps and also works with complex dependencies\&. The downside is that you cannot use globs or case insensitive matching\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSelection matchsolvable(Solvable\fR \fIsolvable\fR\fB, int\fR \fIflags\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
my \fI$sel\fR \fB=\fR \fI$pool\fR\fB\->matchsolvable(\fR\fI$solvable\fR\fB,\fR \fI$flags\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIsel\fR \fB=\fR \fIpool\fR\fB\&.matchsolvable(\fR\fIsolvable\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIsel\fR \fB=\fR \fIpool\fR\fB\&.matchsolvable(\fR\fIsolvable\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a selection by matching package dependencies against the specified solvable\(cqs provides\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid setpooljobs(Jobs *\fR\fIjobs\fR\fB)\fR
\fI$pool\fR\fB\->setpooljobs(\e\fR\fI@jobs\fR\fB)\fR;
\fIpool\fR\fB\&.setpooljobs(\fR\fIjobs\fR\fB)\fR
\fIpool\fR\fB\&.setpooljobs(\fR\fIjobs\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBJob *getpooljobs()\fR
\fI@jobs\fR \fB=\fR \fI$pool\fR\fB\->getpooljobs()\fR;
\fIjobs\fR \fB=\fR \fIpool\fR\fB\&.getpooljobs()\fR
\fIjobs\fR \fB=\fR \fIpool\fR\fB\&.getpooljobs()\fR
.fi
.if n \{\
.RE
.\}
.sp
Get/Set fixed jobs stored in the pool\&. Those jobs are automatically appended to all solver jobs, they are meant for fixed configurations like which packages can be multiversion installed, which packages were userinstalled, or which packages must not be erased\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid set_loadcallback(Callable *\fR\fIcallback\fR\fB)\fR
\fI$pool\fR\fB\->setloadcallback(\e\fR\fI&callbackfunction\fR\fB)\fR;
\fIpool\fR\fB\&.setloadcallback(\fR\fIcallbackfunction\fR\fB)\fR
\fIpool\fR\fB\&.setloadcallback { |\fR\fIrepodata\fR\fB| \&.\&.\&. }\fR
.fi
.if n \{\
.RE
.\}
.sp
Set the callback function called when repository metadata needs to be loaded on demand\&. To make use of this feature, you need to create repodata stubs that tell the library which data is available but not loaded\&. If later on the data needs to be accessed, the callback function is called with a repodata argument\&. You can then load the data (maybe fetching it first from a remote server)\&. The callback should return true if the data has been made available\&.
.sp
.if n \{\
.RS 4
.\}
.nf
/* bindings only */
\fI$pool\fR\fB\->appdata_disown()\fR
\fIpool\fR\fB\&.appdata_disown()\fR
\fIpool\fR\fB\&.appdata_disown()\fR
.fi
.if n \{\
.RE
.\}
.sp
Decrement the reference count of the appdata object\&. This can be used to break circular references (e\&.g\&. if the pool\(cqs appdata value points to some meta data structure that contains a pool handle)\&. If used incorrectly, this method can lead to application crashes, so beware\&. (This method is a no\-op for ruby and tcl\&.)
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId *get_considered_list()\fR
my \fI@ids\fR \fB=\fR \fI$pool\fR\fB\->get_considered_list()\fR;
\fIids\fR \fB=\fR \fIpool\fR\fB\&.get_considered_list()\fR
\fIids\fR \fB=\fR \fIpool\fR\fB\&.get_considered_list()\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid set_considered_list(Id *\fR\fIids\fR\fB)\fR
\fI$pool\fR\fB\->set_considered_list(\e\fR\fI@ids\fR\fB)\fR;
\fIpool\fR\fB\&.set_considered_list(\fR\fIids\fR\fB)\fR
\fIpool\fR\fB\&.set_considered_list(\fR\fIids\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Get/set the list of solvables that are eligible for installation\&. Note that you need to recreate the whatprovides hash after changing the list\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId *get_disabled_list()\fR
my \fI@ids\fR \fB=\fR \fI$pool\fR\fB\->get_disabled_list()\fR;
\fIids\fR \fB=\fR \fIpool\fR\fB\&.get_disabled_list()\fR
\fIids\fR \fB=\fR \fIpool\fR\fB\&.get_disabled_list()\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid set_disabled_list(Id *\fR\fIids\fR\fB)\fR
\fI$pool\fR\fB\->set_disabled_list(\e\fR\fI@ids\fR\fB)\fR;
\fIpool\fR\fB\&.set_disabled_list(\fR\fIids\fR\fB)\fR
\fIpool\fR\fB\&.set_disabled_list(\fR\fIids\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Get/set the list of solvables that are not eligible for installation\&. This is basically the inverse of the \(lqconsidered\(rq methods above, i\&.e\&. calling \(lqset_disabled_list()\(rq with an empty list will make all solvables eligible for installation\&. Note you need to recreate the whatprovides hash after changing the list\&.
.SS "DATA RETRIEVAL METHODS"
.sp
In the following functions, the \fIkeyname\fR argument describes what to retrieve\&. For the standard cases you can use the available Id constants\&. For example,
.sp
.if n \{\
.RS 4
.\}
.nf
\fB$solv::SOLVABLE_SUMMARY\fR
\fBsolv\&.SOLVABLE_SUMMARY\fR
\fBSolv::SOLVABLE_SUMMARY\fR
.fi
.if n \{\
.RE
.\}
.sp
selects the \(lqSummary\(rq entry of a solvable\&. The \fIsolvid\fR argument selects the desired solvable by Id\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *lookup_str(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR
my \fI$string\fR \fB=\fR \fI$pool\fR\fB\->lookup_str(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIstring\fR \fB=\fR \fIpool\fR\fB\&.lookup_str(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIstring\fR \fB=\fR \fIpool\fR\fB\&.lookup_str(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId lookup_id(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR
my \fI$id\fR \fB=\fR \fI$pool\fR\fB\->lookup_id(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIid\fR \fB=\fR \fIpool\fR\fB\&.lookup_id(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIid\fR \fB=\fR \fIpool\fR\fB\&.lookup_id(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBunsigned long long lookup_num(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, unsigned long long\fR \fInotfound\fR \fB= 0)\fR
my \fI$num\fR \fB=\fR \fI$pool\fR\fB\->lookup_num(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fInum\fR \fB=\fR \fIpool\fR\fB\&.lookup_num(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fInum\fR \fB=\fR \fIpool\fR\fB\&.lookup_num(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool lookup_void(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR
my \fI$bool\fR \fB=\fR \fI$pool\fR\fB\->lookup_void(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIbool\fR \fB=\fR \fIpool\fR\fB\&.lookup_void(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIbool\fR \fB=\fR \fIpool\fR\fB\&.lookup_void(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId *lookup_idarray(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR
my \fI@ids\fR \fB=\fR \fI$pool\fR\fB\->lookup_idarray(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIids\fR \fB=\fR \fIpool\fR\fB\&.lookup_idarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIids\fR \fB=\fR \fIpool\fR\fB\&.lookup_idarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBChksum lookup_checksum(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR
my \fI$chksum\fR \fB=\fR \fI$pool\fR\fB\->lookup_checksum(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIchksum\fR \fB=\fR \fIpool\fR\fB\&.lookup_checksum(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIchksum\fR \fB=\fR \fIpool\fR\fB\&.lookup_checksum(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Lookup functions\&. Return the data element stored in the specified solvable\&. You should probably use the methods of the Solvable class instead\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDataiterator Dataiterator(Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR
my \fI$di\fR \fB=\fR \fI$pool\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
\fIdi\fR \fB=\fR \fIpool\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
\fIdi\fR \fB=\fR \fIpool\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDataiterator Dataiterator_solvid(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR
my \fI$di\fR \fB=\fR \fI$pool\fR\fB\->Dataiterator(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
\fIdi\fR \fB=\fR \fIpool\fR\fB\&.Dataiterator(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
\fIdi\fR \fB=\fR \fIpool\fR\fB\&.Dataiterator(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBfor my\fR \fI$d\fR \fB(\fR\fI@$di\fR\fB)\fR
\fBfor\fR \fId\fR \fBin\fR \fIdi\fR\fB:\fR
\fBfor\fR \fId\fR \fBin\fR \fIdi\fR
.fi
.if n \{\
.RE
.\}
.sp
Iterate over the matching data elements\&. See the Dataiterator class for more information\&. The Dataiterator method iterates over all solvables in the pool, whereas the Dataiterator_solvid only iterates over the specified solvable\&.
.SS "ID METHODS"
.sp
The following methods deal with Ids, i\&.e\&. integers representing objects in the pool\&. They are considered \(lqlow level\(rq, in most cases you would not use them but instead the object orientated methods\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRepo id2repo(Id\fR \fIid\fR\fB)\fR
\fI$repo\fR \fB=\fR \fI$pool\fR\fB\->id2repo(\fR\fI$id\fR\fB)\fR;
\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.id2repo(\fR\fIid\fR\fB)\fR
\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.id2repo(\fR\fIid\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Lookup an existing Repository by id\&. You can also do this by using the \fBrepos\fR attribute\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable id2solvable(Id\fR \fIid\fR\fB)\fR
\fI$solvable\fR \fB=\fR \fI$pool\fR\fB\->id2solvable(\fR\fI$id\fR\fB)\fR;
\fIsolvable\fR \fB=\fR \fIpool\fR\fB\&.id2solvable(\fR\fIid\fR\fB)\fR
\fIsolvable\fR \fB=\fR \fIpool\fR\fB\&.id2solvable(\fR\fIid\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Lookup an existing Repository by id\&. You can also do this by using the \fBsolvables\fR attribute\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *solvid2str(Id\fR \fIid\fR\fB)\fR
my \fI$str\fR \fB=\fR \fI$pool\fR\fB\->solvid2str(\fR\fI$id\fR\fB)\fR;
\fIstr\fR \fB=\fR \fIpool\fR\fB\&.solvid2str(\fR\fIid\fR\fB)\fR
\fIstr\fR \fB=\fR \fIpool\fR\fB\&.solvid2str(\fR\fIid\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Return a string describing the Solvable with the specified id\&. The string consists of the name, version, and architecture of the Solvable\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId str2id(const char *\fR\fIstr\fR\fB, bool\fR \fIcreate\fR \fB= 1)\fR
my \fI$id\fR \fB=\fR \fIpool\fR\fB\->str2id(\fR\fI$string\fR\fB)\fR;
\fIid\fR \fB=\fR \fIpool\fR\fB\&.str2id(\fR\fIstring\fR\fB)\fR
\fIid\fR \fB=\fR \fIpool\fR\fB\&.str2id(\fR\fIstring\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *id2str(Id\fR \fIid\fR\fB)\fR
\fI$string\fR \fB=\fR \fIpool\fR\fB\->id2str(\fR\fI$id\fR\fB)\fR;
\fIstring\fR \fB=\fR \fIpool\fR\fB\&.id2str(\fR\fIid\fR\fB)\fR
\fIstring\fR \fB=\fR \fIpool\fR\fB\&.id2str(\fR\fIid\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Convert a string into an Id and back\&. If the string is currently not in the pool and \fIcreate\fR is false, zero is returned\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId rel2id(Id\fR \fIname\fR\fB, Id\fR \fIevr\fR\fB, int\fR \fIflags\fR\fB, bool\fR \fIcreate\fR \fB= 1)\fR
my \fI$id\fR \fB=\fR \fIpool\fR\fB\->rel2id(\fR\fI$nameid\fR\fB,\fR \fI$evrid\fR\fB,\fR \fI$flags\fR\fB)\fR;
\fIid\fR \fB=\fR \fIpool\fR\fB\&.rel2id(\fR\fInameid\fR\fB,\fR \fIevrid\fR\fB,\fR \fIflags\fR\fB)\fR
\fIid\fR \fB=\fR \fIpool\fR\fB\&.rel2id(\fR\fInameid\fR\fB,\fR \fIevrid\fR\fB,\fR \fIflags\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a \(lqrelational\(rq dependency\&. Such dependencies consist of a name part, \fIflags\fR describing the relation, and a version part\&. The flags are:
.sp
.if n \{\
.RS 4
.\}
.nf
\fB$solv::REL_EQ | $solv::REL_GT | $solv::REL_LT\fR
\fBsolv\&.REL_EQ | solv\&.REL_GT | solv\&.REL_LT\fR
\fBSolv::REL_EQ | Solv::REL_GT | Solv::REL_LT\fR
.fi
.if n \{\
.RE
.\}
.sp
Thus, if you want a \(lq<=\(rq relation, you would use \fBREL_LT | REL_EQ\fR\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId id2langid(Id\fR \fIid\fR\fB, const char *\fR\fIlang\fR\fB, bool\fR \fIcreate\fR \fB= 1)\fR
my \fI$id\fR \fB=\fR \fI$pool\fR\fB\->id2langid(\fR\fI$id\fR\fB,\fR \fI$language\fR\fB)\fR;
\fIid\fR \fB=\fR \fIpool\fR\fB\&.id2langid(\fR\fIid\fR\fB,\fR \fIlanguage\fR\fB)\fR
\fIid\fR \fB=\fR \fIpool\fR\fB\&.id2langid(\fR\fIid\fR\fB,\fR \fIlanguage\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a language specific Id from some other id\&. This function simply converts the id into a string, appends a dot and the specified language to the string and converts the result back into an Id\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *dep2str(Id\fR \fIid\fR\fB)\fR
\fI$string\fR \fB=\fR \fIpool\fR\fB\->dep2str(\fR\fI$id\fR\fB)\fR;
\fIstring\fR \fB=\fR \fIpool\fR\fB\&.dep2str(\fR\fIid\fR\fB)\fR
\fIstring\fR \fB=\fR \fIpool\fR\fB\&.dep2str(\fR\fIid\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Convert a dependency id into a string\&. If the id is just a string, this function has the same effect as id2str()\&. For relational dependencies, the result is the correct \(lqname relation evr\(rq string\&.
.SH "THE DEPENDENCY CLASS"
.sp
The dependency class is an object orientated way to work with strings and dependencies\&. Internally, dependencies are represented as Ids, i\&.e\&. simple numbers\&. Dependency objects can be constructed by using the Pool\(cqs Dep() method\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBPool *pool;\fR             /* read only */
\fI$dep\fR\fB\->{pool}\fR
\fIdep\fR\fB\&.pool\fR
\fIdep\fR\fB\&.pool\fR
.fi
.if n \{\
.RE
.\}
.sp
Back reference to the pool this dependency belongs to\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId id;\fR          /* read only */
\fI$dep\fR\fB\->{id}\fR
\fIdep\fR\fB\&.id\fR
\fIdep\fR\fB\&.id\fR
.fi
.if n \{\
.RE
.\}
.sp
The id of this dependency\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDep Rel(int\fR \fIflags\fR\fB, DepId\fR \fIevrid\fR\fB, bool\fR \fIcreate\fR \fB= 1)\fR
my \fI$reldep\fR \fB=\fR \fI$dep\fR\fB\->Rel(\fR\fI$flags\fR\fB,\fR \fI$evrdep\fR\fB)\fR;
\fIreldep\fR \fB=\fR \fIdep\fR\fB\&.Rel(\fR\fIflags\fR\fB,\fR \fIevrdep\fR\fB)\fR
\fIreldep\fR \fB=\fR \fIdep\fR\fB\&.Rel(\fR\fIflags\fR\fB,\fR \fIevrdep\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a relational dependency from the caller dependency, the flags, and a dependency describing the \(lqversion\(rq part\&. See the pool\(cqs rel2id method for a description of the flags\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSelection Selection_name(int\fR \fIsetflags\fR \fB= 0)\fR
my \fI$sel\fR \fB=\fR \fI$dep\fR\fB\->Selection_name()\fR;
\fIsel\fR \fB=\fR \fIdep\fR\fB\&.Selection_name()\fR
\fIsel\fR \fB=\fR \fIdep\fR\fB\&.Selection_name()\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a Selection from a dependency\&. The selection consists of all packages that have a name equal to the dependency\&. If the dependency is of a relational type, the packages version must also fulfill the dependency\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSelection Selection_provides(int\fR \fIsetflags\fR \fB= 0)\fR
my \fI$sel\fR \fB=\fR \fI$dep\fR\fB\->Selection_provides()\fR;
\fIsel\fR \fB=\fR \fIdep\fR\fB\&.Selection_provides()\fR
\fIsel\fR \fB=\fR \fIdep\fR\fB\&.Selection_provides()\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a Selection from a dependency\&. The selection consists of all packages that have at least one provides matching the dependency\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *str()\fR
my \fI$str\fR \fB=\fR \fI$dep\fR\fB\->str()\fR;
\fIstr\fR \fB=\fR \fI$dep\fR\fB\&.str()\fR
\fIstr\fR \fB=\fR \fI$dep\fR\fB\&.str()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return a string describing the dependency\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<stringification>\fR
my \fI$str\fR \fB=\fR \fI$dep\fR\fB\->str\fR;
\fIstr\fR \fB= str(\fR\fIdep\fR\fB)\fR
\fIstr\fR \fB=\fR \fIdep\fR\fB\&.to_s\fR
.fi
.if n \{\
.RE
.\}
.sp
Same as calling the str() method\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<equality>\fR
\fBif (\fR\fI$dep1\fR \fB==\fR \fI$dep2\fR\fB)\fR
\fBif\fR \fIdep1\fR \fB==\fR \fIdep2\fR\fB:\fR
\fBif\fR \fIdep1\fR \fB==\fR \fIdep2\fR
.fi
.if n \{\
.RE
.\}
.sp
Two dependencies are equal if they are part of the same pool and have the same ids\&.
.SH "THE REPOSITORY CLASS"
.sp
A Repository describes a group of packages, normally coming from the same source\&. Repositories are created by the Pool\(cqs add_repo() method\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBPool *pool;\fR                     /* read only */
\fI$repo\fR\fB\->{pool}\fR
\fIrepo\fR\fB\&.pool\fR
\fIrepo\fR\fB\&.pool\fR
.fi
.if n \{\
.RE
.\}
.sp
Back reference to the pool this dependency belongs to\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId id;\fR                          /* read only */
\fI$repo\fR\fB\->{id}\fR
\fIrepo\fR\fB\&.id\fR
\fIrepo\fR\fB\&.id\fR
.fi
.if n \{\
.RE
.\}
.sp
The id of the repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *name;\fR               /* read/write */
\fI$repo\fR\fB\->{name}\fR
\fIrepo\fR\fB\&.name\fR
\fIrepo\fR\fB\&.name\fR
.fi
.if n \{\
.RE
.\}
.sp
The repositories name\&. To libsolv, the name is just a string with no specific meaning\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint priority;\fR                   /* read/write */
\fI$repo\fR\fB\->{priority}\fR
\fIrepo\fR\fB\&.priority\fR
\fIrepo\fR\fB\&.priority\fR
.fi
.if n \{\
.RE
.\}
.sp
The priority of the repository\&. A higher number means that packages of this repository will be chosen over other repositories, even if they have a greater package version\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint subpriority;\fR                /* read/write */
\fI$repo\fR\fB\->{subpriority}\fR
\fIrepo\fR\fB\&.subpriority\fR
\fIrepo\fR\fB\&.subpriority\fR
.fi
.if n \{\
.RE
.\}
.sp
The sub\-priority of the repository\&. This value is compared when the priorities of two repositories are the same\&. It is useful to make the library prefer on\-disk repositories to remote ones\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint nsolvables;\fR                 /* read only */
\fI$repo\fR\fB\->{nsolvables}\fR
\fIrepo\fR\fB\&.nsolvables\fR
\fIrepo\fR\fB\&.nsolvables\fR
.fi
.if n \{\
.RE
.\}
.sp
The number of solvables in this repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid *appdata;\fR                  /* read/write */
\fI$repo\fR\fB\->{appdata}\fR
\fIrepo\fR\fB\&.appdata\fR
\fIrepo\fR\fB\&.appdata\fR
.fi
.if n \{\
.RE
.\}
.sp
Application specific data that may be used in any way by the code using the repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDatapos *meta;\fR                  /* read only */
\fI$repo\fR\fB\->{meta}\fR
\fIrepo\fR\fB\&.meta\fR
\fIrepo\fR\fB\&.meta\fR
.fi
.if n \{\
.RE
.\}
.sp
Return a Datapos object of the repodata\(cqs metadata\&. You can use the lookup methods of the Datapos class to lookup metadata attributes, like the repository timestamp\&.
.SS "CONSTANTS"
.PP
\fBREPO_REUSE_REPODATA\fR
.RS 4
Reuse the last repository data area (\(lqrepodata\(rq) instead of creating a new area\&.
.RE
.PP
\fBREPO_NO_INTERNALIZE\fR
.RS 4
Do not internalize the added repository data\&. This is useful if you plan to add more data because internalization is a costly operation\&.
.RE
.PP
\fBREPO_LOCALPOOL\fR
.RS 4
Use the repodata\(cqs pool for Id storage instead of the global pool\&. Useful if you don\(cqt want to pollute the global pool with many unneeded ids, like when storing the filelist\&.
.RE
.PP
\fBREPO_USE_LOADING\fR
.RS 4
Use the repodata that is currently being loaded instead of creating a new one\&. This only makes sense if used in a load callback\&.
.RE
.PP
\fBREPO_EXTEND_SOLVABLES\fR
.RS 4
Do not create new solvables for the new data, but match existing solvables and add the data to them\&. Repository metadata is often split into multiple parts, with one primary file describing all packages and other parts holding information that is normally not needed, like the changelog\&.
.RE
.PP
\fBREPO_USE_ROOTDIR\fR
.RS 4
Prepend the pool\(cqs rootdir to the path when doing file operations\&.
.RE
.PP
\fBREPO_NO_LOCATION\fR
.RS 4
Do not add a location element to the solvables\&. Useful if the solvables are not in the final position, so you can add the correct location later in your code\&.
.RE
.PP
\fBSOLV_ADD_NO_STUBS\fR
.RS 4
Do not create stubs for repository parts that can be downloaded on demand\&.
.RE
.PP
\fBSUSETAGS_RECORD_SHARES\fR
.RS 4
This is specific to the add_susetags() method\&. Susetags allows one to refer to already read packages to save disk space\&. If this data sharing needs to work over multiple calls to add_susetags, you need to specify this flag so that the share information is made available to subsequent calls\&.
.RE
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid free(bool\fR \fIreuseids\fR \fB= 0)\fR
\fI$repo\fR\fB\->free()\fR;
\fIrepo\fR\fB\&.free()\fR
\fIrepo\fR\fB\&.free()\fR
.fi
.if n \{\
.RE
.\}
.sp
Free the repository and all solvables it contains\&. If \fIreuseids\fR is set to true, the solvable ids and the repository id may be reused by the library when added new solvables\&. Thus you should leave it false if you are not sure that somebody holds a reference\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid empty(bool\fR \fIreuseids\fR \fB= 0)\fR
\fI$repo\fR\fB\->empty()\fR;
\fIrepo\fR\fB\&.empty()\fR
\fIrepo\fR\fB\&.empty()\fR
.fi
.if n \{\
.RE
.\}
.sp
Free all the solvables in a repository\&. The repository will be empty after this call\&. See the free() method for the meaning of \fIreuseids\fR\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool isempty()\fR
\fI$repo\fR\fB\->isempty()\fR
\fIrepo\fR\fB\&.empty()\fR
\fIrepo\fR\fB\&.empty?\fR
.fi
.if n \{\
.RE
.\}
.sp
Return true if there are no solvables in this repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid internalize()\fR
\fI$repo\fR\fB\->internalize()\fR;
\fIrepo\fR\fB\&.internalize()\fR
\fIrepo\fR\fB\&.internalize()\fR
.fi
.if n \{\
.RE
.\}
.sp
Internalize added data\&. Data must be internalized before it is available to the lookup and data iterator functions\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool write(FILE *\fR\fIfp\fR\fB)\fR
\fI$repo\fR\fB\->write(\fR\fI$fp\fR\fB)\fR
\fIrepo\fR\fB\&.write(\fR\fIfp\fR\fB)\fR
\fIrepo\fR\fB\&.write(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Write a repo as a \(lqsolv\(rq file\&. These files can be read very fast and thus are a good way to cache repository data\&. Returns false if there was some error writing the file\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvableiterator solvables_iter()\fR
\fBfor my\fR \fI$solvable\fR \fB(\fR\fI@\fR\fB{\fR\fI$repo\fR\fB\->solvables_iter()})\fR
\fBfor\fR \fIsolvable\fR \fBin\fR \fIrepo\fR\fB\&.solvables_iter():\fR
\fBfor\fR \fIsolvable\fR \fBin\fR \fIrepo\fR\fB\&.solvables_iter()\fR
.fi
.if n \{\
.RE
.\}
.sp
Iterate over all solvables in a repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRepodata add_repodata(int\fR \fIflags\fR \fB= 0)\fR
my \fI$repodata\fR \fB=\fR \fI$repo\fR\fB\->add_repodata()\fR;
\fIrepodata\fR \fB=\fR \fIrepo\fR\fB\&.add_repodata()\fR
\fIrepodata\fR \fB=\fR \fIrepo\fR\fB\&.add_repodata()\fR
.fi
.if n \{\
.RE
.\}
.sp
Add a new repodata area to the repository\&. This is normally automatically done by the repo_add methods, so you need this method only in very rare circumstances\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid create_stubs()\fR
\fI$repo\fR\fB\->create_stubs()\fR;
\fIrepo\fR\fB\&.create_stubs()\fR
\fIrepo\fR\fB\&.create_stubs()\fR
.fi
.if n \{\
.RE
.\}
.sp
Calls the create_stubs() repodata method for the last repodata of the repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool iscontiguous()\fR
\fI$repo\fR\fB\->iscontiguous()\fR
\fIrepo\fR\fB\&.iscontiguous()\fR
\fIrepo\fR\fB\&.iscontiguous?\fR
.fi
.if n \{\
.RE
.\}
.sp
Return true if the solvables of this repository are all in a single block with no holes, i\&.e\&. they have consecutive ids\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRepodata first_repodata()\fR
my \fI$repodata\fR \fB=\fR \fI$repo\fR\fB\->first_repodata()\fR;
\fIrepodata\fR \fB=\fR \fIrepo\fR\fB\&.first_repodata()\fR
\fIrepodata\fR \fB=\fR \fIrepo\fR\fB\&.first_repodata()\fR
.fi
.if n \{\
.RE
.\}
.sp
Checks if all repodatas but the first repodata are extensions, and return the first repodata if this is the case\&. Useful if you want to do a store/retrieve sequence on the repository to reduce the memory using and enable paging, as this does not work if the repository contains multiple non\-extension repodata areas\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSelection Selection(int\fR \fIsetflags\fR \fB= 0)\fR
my \fI$sel\fR \fB=\fR \fI$repo\fR\fB\->Selection()\fR;
\fIsel\fR \fB=\fR \fIrepo\fR\fB\&.Selection()\fR
\fIsel\fR \fB=\fR \fIrepo\fR\fB\&.Selection()\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a Selection consisting of all packages in the repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDataiterator Dataiterator(Id\fR \fIkey\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR
my \fI$di\fR \fB=\fR \fI$repo\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDataiterator Dataiterator_meta(Id\fR \fIkey\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR
my \fI$di\fR \fB=\fR \fI$repo\fR\fB\->Dataiterator_meta(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator_meta(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator_meta(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBfor my\fR \fI$d\fR \fB(\fR\fI@$di\fR\fB)\fR
\fBfor\fR \fId\fR \fBin\fR \fIdi\fR\fB:\fR
\fBfor\fR \fId\fR \fBin\fR \fIdi\fR
.fi
.if n \{\
.RE
.\}
.sp
Iterate over the matching data elements in this repository\&. See the Dataiterator class for more information\&. The Dataiterator() method iterates over all solvables in a repository, whereas the Dataiterator_meta method only iterates over the repository\(cqs meta data\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<stringification>\fR
my \fI$str\fR \fB=\fR \fI$repo\fR\fB\->str\fR;
\fIstr\fR \fB= str(\fR\fIrepo\fR\fB)\fR
\fIstr\fR \fB=\fR \fIrepo\fR\fB\&.to_s\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the name of the repository, or "Repo#<id>" if no name is set\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<equality>\fR
\fBif (\fR\fI$repo1\fR \fB==\fR \fI$repo2\fR\fB)\fR
\fBif\fR \fIrepo1\fR \fB==\fR \fIrepo2\fR\fB:\fR
\fBif\fR \fIrepo1\fR \fB==\fR \fIrepo2\fR
.fi
.if n \{\
.RE
.\}
.sp
Two repositories are equal if they belong to the same pool and have the same id\&.
.SS "DATA ADD METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable add_solvable()\fR
\fI$repo\fR\fB\->add_solvable()\fR;
\fIrepo\fR\fB\&.add_solvable()\fR
\fIrepo\fR\fB\&.add_solvable()\fR
.fi
.if n \{\
.RE
.\}
.sp
Add a single empty solvable to the repository\&. Returns a Solvable object, see the Solvable class for more information\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_solv(const char *\fR\fIname\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_solv(\fR\fI$name\fR\fB)\fR;
\fIrepo\fR\fB\&.add_solv(\fR\fIname\fR\fB)\fR
\fIrepo\fR\fB\&.add_solv(\fR\fIname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_solv(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_solv(\fR\fI$fp\fR\fB)\fR;
\fIrepo\fR\fB\&.add_solv(\fR\fIfp\fR\fB)\fR
\fIrepo\fR\fB\&.add_solv(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Read a \(lqsolv\(rq file and add its contents to the repository\&. These files can be written with the write() method and are normally used as fast cache for repository metadata\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_rpmdb(int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_rpmdb()\fR;
\fIrepo\fR\fB\&.add_rpmdb()\fR
\fIrepo\fR\fB\&.add_rpmdb()\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_rpmdb_reffp(FILE *\fR\fIreffp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_rpmdb_reffp(\fR\fI$reffp\fR\fB)\fR;
\fIrepo\fR\fB\&.add_rpmdb_reffp(\fR\fIreffp\fR\fB)\fR
\fIrepo\fR\fB\&.add_rpmdb_reffp(\fR\fIreffp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the contents of the rpm database to the repository\&. If a solv file containing an old version of the database is available, it can be passed as reffp to speed up reading\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable add_rpm(const char *\fR\fIfilename\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
my \fI$solvable\fR \fB=\fR \fI$repo\fR\fB\->add_rpm(\fR\fI$filename\fR\fB)\fR;
\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_rpm(\fR\fIfilename\fR\fB)\fR
\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_rpm(\fR\fIfilename\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the metadata of a single rpm package to the repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_rpmdb_pubkeys(int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_rpmdb_pubkeys()\fR;
\fIrepo\fR\fB\&.add_rpmdb_pubkeys()\fR
\fIrepo\fR\fB\&.add_rpmdb_pubkeys()\fR
.fi
.if n \{\
.RE
.\}
.sp
Add all pubkeys contained in the rpm database to the repository\&. Note that newer rpm versions also allow to store the pubkeys in some directory instead of the rpm database\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable add_pubkey(const char *\fR\fIkeyfile\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
my \fI$solvable\fR \fB=\fR \fI$repo\fR\fB\->add_pubkey(\fR\fI$keyfile\fR\fB)\fR;
\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_pubkey(\fR\fIkeyfile\fR\fB)\fR
\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_pubkey(\fR\fIkeyfile\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add a pubkey from a file to the repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_rpmmd(FILE *\fR\fIfp\fR\fB, const char *\fR\fIlanguage\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_rpmmd(\fR\fI$fp\fR\fB,\fR \fIundef\fR\fB)\fR;
\fIrepo\fR\fB\&.add_rpmmd(\fR\fIfp\fR\fB,\fR \fINone\fR\fB)\fR
\fIrepo\fR\fB\&.add_rpmmd(\fR\fIfp\fR\fB,\fR \fInil\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add metadata stored in the "rpm\-md" format (i\&.e\&. from files in the \(lqrepodata\(rq directory) to a repository\&. Supported files are "primary", "filelists", "other", "suseinfo"\&. Do not forget to specify the \fBREPO_EXTEND_SOLVABLES\fR for extension files like "filelists" and "other"\&. Use the \fIlanguage\fR parameter if you have language extension files, otherwise simply use a \fBundef\fR/\fBNone\fR/\fBnil\fR parameter\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_repomdxml(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_repomdxml(\fR\fI$fp\fR\fB)\fR;
\fIrepo\fR\fB\&.add_repomdxml(\fR\fIfp\fR\fB)\fR
\fIrepo\fR\fB\&.add_repomdxml(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the repomd\&.xml meta description from the "rpm\-md" format to the repository\&. This file contains information about the repository like keywords, and also a list of all database files with checksums\&. The data is added to the "meta" section of the repository, i\&.e\&. no package gets created\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_updateinfoxml(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_updateinfoxml(\fR\fI$fp\fR\fB)\fR;
\fIrepo\fR\fB\&.add_updateinfoxml(\fR\fIfp\fR\fB)\fR
\fIrepo\fR\fB\&.add_updateinfoxml(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the updateinfo\&.xml file containing available maintenance updates to the repository\&. All updates are created as special packages that have a "patch:" prefix in their name\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_deltainfoxml(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_deltainfoxml(\fR\fI$fp\fR\fB)\fR;
\fIrepo\fR\fB\&.add_deltainfoxml(\fR\fIfp\fR\fB)\fR
\fIrepo\fR\fB\&.add_deltainfoxml(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the deltainfo\&.xml file (also called prestodelta\&.xml) containing available delta\-rpms to the repository\&. The data is added to the "meta" section, i\&.e\&. no package gets created\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_debdb(int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_debdb()\fR;
\fIrepo\fR\fB\&.add_debdb()\fR
\fIrepo\fR\fB\&.add_debdb()\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the contents of the debian installed package database to the repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_debpackages(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_debpackages(\fR\fI$fp\fR\fB)\fR;
\fIrepo\fR\fB\&.add_debpackages(\fR\fI$fp\fR\fB)\fR
\fIrepo\fR\fB\&.add_debpackages(\fR\fI$fp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the contents of the debian repository metadata (the "packages" file) to the repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable add_deb(const char *\fR\fIfilename\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
my \fI$solvable\fR \fB=\fR \fI$repo\fR\fB\->add_deb(\fR\fI$filename\fR\fB)\fR;
\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_deb(\fR\fIfilename\fR\fB)\fR
\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_deb(\fR\fIfilename\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the metadata of a single deb package to the repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_mdk(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_mdk(\fR\fI$fp\fR\fB)\fR;
\fIrepo\fR\fB\&.add_mdk(\fR\fIfp\fR\fB)\fR
\fIrepo\fR\fB\&.add_mdk(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the contents of the mageia/mandriva repository metadata (the "synthesis\&.hdlist" file) to the repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_mdk_info(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_mdk_info(\fR\fI$fp\fR\fB)\fR;
\fIrepo\fR\fB\&.add_mdk_info(\fR\fIfp\fR\fB)\fR
\fIrepo\fR\fB\&.add_mdk_info(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Extend the packages from the synthesis file with the info\&.xml and files\&.xml data\&. Do not forget to specify \fBREPO_EXTEND_SOLVABLES\fR\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_arch_repo(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_arch_repo(\fR\fI$fp\fR\fB)\fR;
\fIrepo\fR\fB\&.add_arch_repo(\fR\fIfp\fR\fB)\fR
\fIrepo\fR\fB\&.add_arch_repo(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the contents of the archlinux repository metadata (the "\&.db\&.tar" file) to the repository\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_arch_local(const char *\fR\fIdir\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_arch_local(\fR\fI$dir\fR\fB)\fR;
\fIrepo\fR\fB\&.add_arch_local(\fR\fIdir\fR\fB)\fR
\fIrepo\fR\fB\&.add_arch_local(\fR\fIdir\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the contents of the archlinux installed package database to the repository\&. The \fIdir\fR parameter is usually set to "/var/lib/pacman/local"\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_content(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_content(\fR\fI$fp\fR\fB)\fR;
\fIrepo\fR\fB\&.add_content(\fR\fIfp\fR\fB)\fR
\fIrepo\fR\fB\&.add_content(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the \(lqcontent\(rq meta description from the susetags format to the repository\&. This file contains information about the repository like keywords, and also a list of all database files with checksums\&. The data is added to the "meta" section of the repository, i\&.e\&. no package gets created\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_susetags(FILE *\fR\fIfp\fR\fB, Id\fR \fIdefvendor\fR\fB, const char *\fR\fIlanguage\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_susetags(\fR\fI$fp\fR\fB,\fR \fI$defvendor\fR\fB,\fR \fI$language\fR\fB)\fR;
\fIrepo\fR\fB\&.add_susetags(\fR\fIfp\fR\fB,\fR \fIdefvendor\fR\fB,\fR \fIlanguage\fR\fB)\fR
\fIrepo\fR\fB\&.add_susetags(\fR\fIfp\fR\fB,\fR \fIdefvendor\fR\fB,\fR \fIlanguage\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add repository metadata in the susetags format to the repository\&. Like with add_rpmmd, you can specify a language if you have language extension files\&. The \fIdefvendor\fR parameter provides a default vendor for packages with missing vendors, it is usually provided in the content file\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_products(const char *\fR\fIdir\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_products(\fR\fI$dir\fR\fB)\fR;
\fIrepo\fR\fB\&.add_products(\fR\fIdir\fR\fB)\fR
\fIrepo\fR\fB\&.add_products(\fR\fIdir\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the installed SUSE products database to the repository\&. The \fIdir\fR parameter is usually "/etc/products\&.d"\&.
.SH "THE SOLVABLE CLASS"
.sp
A solvable describes all the information of one package\&. Each solvable belongs to one repository, it can be added and filled manually but in most cases solvables will get created by the repo_add methods\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRepo *repo;\fR                     /* read only */
\fI$solvable\fR\fB\->{repo}\fR
\fIsolvable\fR\fB\&.repo\fR
\fIsolvable\fR\fB\&.repo\fR
.fi
.if n \{\
.RE
.\}
.sp
The repository this solvable belongs to\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBPool *pool;\fR                     /* read only */
\fI$solvable\fR\fB\->{pool}\fR
\fIsolvable\fR\fB\&.pool\fR
\fIsolvable\fR\fB\&.pool\fR
.fi
.if n \{\
.RE
.\}
.sp
The pool this solvable belongs to, same as the pool of the repo\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId id;\fR                          /* read only */
\fI$solvable\fR\fB\->{id}\fR
\fIsolvable\fR\fB\&.id\fR
\fIsolvable\fR\fB\&.id\fR
.fi
.if n \{\
.RE
.\}
.sp
The specific id of the solvable\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBchar *name;\fR                     /* read/write */
\fI$solvable\fR\fB\->{name}\fR
\fIsolvable\fR\fB\&.name\fR
\fIsolvable\fR\fB\&.name\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBchar *evr;\fR                      /* read/write */
\fI$solvable\fR\fB\->{evr}\fR
\fIsolvable\fR\fB\&.evr\fR
\fIsolvable\fR\fB\&.evr\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBchar *arch;\fR                     /* read/write */
\fI$solvable\fR\fB\->{arch}\fR
\fIsolvable\fR\fB\&.arch\fR
\fIsolvable\fR\fB\&.arch\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBchar *vendor;\fR                   /* read/write */
\fI$solvable\fR\fB\->{vendor}\fR
\fIsolvable\fR\fB\&.vendor\fR
\fIsolvable\fR\fB\&.vendor\fR
.fi
.if n \{\
.RE
.\}
.sp
Easy access to often used attributes of solvables\&. They are internally stored as Ids\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId nameid;\fR                      /* read/write */
\fI$solvable\fR\fB\->{nameid}\fR
\fIsolvable\fR\fB\&.nameid\fR
\fIsolvable\fR\fB\&.nameid\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId evrid;\fR                       /* read/write */
\fI$solvable\fR\fB\->{evrid}\fR
\fIsolvable\fR\fB\&.evrid\fR
\fIsolvable\fR\fB\&.evrid\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId archid;\fR                      /* read/write */
\fI$solvable\fR\fB\->{archid}\fR
\fIsolvable\fR\fB\&.archid\fR
\fIsolvable\fR\fB\&.archid\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId vendorid;\fR                    /* read/write */
\fI$solvable\fR\fB\->{vendorid}\fR
\fIsolvable\fR\fB\&.vendorid\fR
\fIsolvable\fR\fB\&.vendorid\fR
.fi
.if n \{\
.RE
.\}
.sp
Raw interface to the ids\&. Useful if you want to search for a specific id and want to avoid the string compare overhead\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *lookup_str(Id\fR \fIkeyname\fR\fB)\fR
my \fI$string\fR \fB=\fR \fI$solvable\fR\fB\->lookup_str(\fR\fI$keyname\fR\fB)\fR;
\fIstring\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_str(\fR\fIkeyname\fR\fB)\fR
\fIstring\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_str(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId lookup_id(Id\fR \fIkeyname\fR\fB)\fR
my \fI$id\fR \fB=\fR \fI$solvable\fR\fB\->lookup_id(\fR\fI$keyname\fR\fB)\fR;
\fIid\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_id(\fR\fIkeyname\fR\fB)\fR
\fIid\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_id(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBunsigned long long lookup_num(Id\fR \fIkeyname\fR\fB, unsigned long long\fR \fInotfound\fR \fB= 0)\fR
my \fI$num\fR \fB=\fR \fI$solvable\fR\fB\->lookup_num(\fR\fI$keyname\fR\fB)\fR;
\fInum\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_num(\fR\fIkeyname\fR\fB)\fR
\fInum\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_num(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool lookup_void(Id\fR \fIkeyname\fR\fB)\fR
my \fI$bool\fR \fB=\fR \fI$solvable\fR\fB\->lookup_void(\fR\fI$keyname\fR\fB)\fR;
\fIbool\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_void(\fR\fIkeyname\fR\fB)\fR
\fIbool\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_void(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBChksum lookup_checksum(Id\fR \fIkeyname\fR\fB)\fR
my \fI$chksum\fR \fB=\fR \fI$solvable\fR\fB\->lookup_checksum(\fR\fI$keyname\fR\fB)\fR;
\fIchksum\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_checksum(\fR\fIkeyname\fR\fB)\fR
\fIchksum\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_checksum(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId *lookup_idarray(Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
my \fI@ids\fR \fB=\fR \fI$solvable\fR\fB\->lookup_idarray(\fR\fI$keyname\fR\fB)\fR;
\fIids\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_idarray(\fR\fIkeyname\fR\fB)\fR
\fIids\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_idarray(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDep *lookup_deparray(Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
my \fI@deps\fR \fB=\fR \fI$solvable\fR\fB\->lookup_deparray(\fR\fI$keyname\fR\fB)\fR;
\fIdeps\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_deparray(\fR\fIkeyname\fR\fB)\fR
\fIdeps\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_deparray(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Generic lookup methods\&. Retrieve data stored for the specific keyname\&. The lookup_idarray() method will return an array of Ids, use lookup_deparray if you want an array of Dependency objects instead\&. Some Id arrays contain two parts of data divided by a specific marker, for example the provides array uses the SOLVABLE_FILEMARKER id to store both the ids provided by the package and the ids added by the addfileprovides method\&. The default, \-1, translates to the correct marker for the keyname and returns the first part of the array, use 1 to select the second part or 0 to retrieve all ids including the marker\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *lookup_location(unsigned int *\fR\fIOUTPUT\fR\fB)\fR;
my \fB(\fR\fI$location\fR\fB,\fR \fI$mediano\fR\fB) =\fR \fI$solvable\fR\fB\->lookup_location()\fR;
\fIlocation\fR\fB,\fR \fImediano\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_location()\fR
\fIlocation\fR\fB,\fR \fImediano\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_location()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return a tuple containing the on\-media location and an optional media number for multi\-part repositories (e\&.g\&. repositories spawning multiple DVDs)\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *lookup_sourcepkg()\fR;
my \fI$sourcepkg\fR \fB=\fR \fI$solvable\fR\fB\->lookup_sourcepkg()\fR;
\fIsourcepkg\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_sourcepkg()\fR
\fIsourcepkg\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_sourcepkg()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return a sourcepkg name associated with solvable\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDataiterator Dataiterator(Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR
my \fI$di\fR \fB=\fR \fI$solvable\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
\fIdi\fR \fB=\fR \fIsolvable\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
\fIdi\fR \fB=\fR \fIsolvable\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBfor my\fR \fI$d\fR \fB(\fR\fI@$di\fR\fB)\fR
\fBfor\fR \fId\fR \fBin\fR \fIdi\fR\fB:\fR
\fBfor\fR \fId\fR \fBin\fR \fIdi\fR
.fi
.if n \{\
.RE
.\}
.sp
Iterate over the matching data elements\&. See the Dataiterator class for more information\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid add_deparray(Id\fR \fIkeyname\fR\fB, DepId\fR \fIdep\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR;
\fI$solvable\fR\fB\->add_deparray(\fR\fI$keyname\fR\fB,\fR \fI$dep\fR\fB)\fR;
\fIsolvable\fR\fB\&.add_deparray(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
\fIsolvable\fR\fB\&.add_deparray(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add a new dependency to the attributes stored in keyname\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid unset(Id\fR \fIkeyname\fR\fB)\fR;
\fI$solvable\fR\fB\->unset(\fR\fI$keyname\fR\fB)\fR;
\fIsolvable\fR\fB\&.unset(\fR\fIkeyname\fR\fB)\fR
\fIsolvable\fR\fB\&.unset(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Delete data stored for the specific keyname\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool installable()\fR;
\fI$solvable\fR\fB\->installable()\fR
\fIsolvable\fR\fB\&.installable()\fR
\fIsolvable\fR\fB\&.installable?\fR
.fi
.if n \{\
.RE
.\}
.sp
Return true if the solvable is installable on the system\&. Solvables are not installable if the system does not support their architecture\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool isinstalled()\fR;
\fI$solvable\fR\fB\->isinstalled()\fR
\fIsolvable\fR\fB\&.isinstalled()\fR
\fIsolvable\fR\fB\&.isinstalled?\fR
.fi
.if n \{\
.RE
.\}
.sp
Return true if the solvable is installed on the system\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool identical(Solvable *\fR\fIother\fR\fB)\fR
\fI$solvable\fR\fB\->identical(\fR\fI$other\fR\fB)\fR
\fIsolvable\fR\fB\&.identical(\fR\fIother\fR\fB)\fR
\fIsolvable\fR\fB\&.identical?(\fR\fIother\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Return true if the two solvables are identical\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint evrcmp(Solvable *\fR\fIother\fR\fB)\fR
\fI$solvable\fR\fB\->evrcmp(\fR\fI$other\fR\fB)\fR
\fIsolvable\fR\fB\&.evrcmp(\fR\fIother\fR\fB)\fR
\fIsolvable\fR\fB\&.evrcmp(\fR\fIother\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Returns \-1 if the epoch/version/release of the solvable is less than the one from the other solvable, 1 if it is greater, and 0 if they are equal\&. Note that "equal" does not mean that the evr is identical\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint matchesdep(Id\fR \fIkeyname\fR\fB, DepId\fR \fIid\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
\fI$solvable\fR\fB\->matchesdep(\fR\fI$keyname\fR\fB,\fR \fI$dep\fR\fB)\fR
\fIsolvable\fR\fB\&.matchesdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
\fIsolvable\fR\fB\&.matchesdep?(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Return true if the dependencies stored in keyname match the specified dependency\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSelection Selection(int\fR \fIsetflags\fR \fB= 0)\fR
my \fI$sel\fR \fB=\fR \fI$solvable\fR\fB\->Selection()\fR;
\fIsel\fR \fB=\fR \fIsolvable\fR\fB\&.Selection()\fR
\fIsel\fR \fB=\fR \fIsolvable\fR\fB\&.Selection()\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a Selection containing just the single solvable\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *str()\fR
my \fI$str\fR \fB=\fR \fI$solvable\fR\fB\->str()\fR;
\fIstr\fR \fB=\fR \fI$solvable\fR\fB\&.str()\fR
\fIstr\fR \fB=\fR \fI$solvable\fR\fB\&.str()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return a string describing the solvable\&. The string consists of the name, version, and architecture of the Solvable\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<stringification>\fR
my \fI$str\fR \fB=\fR \fI$solvable\fR\fB\->str\fR;
\fIstr\fR \fB= str(\fR\fIsolvable\fR\fB)\fR
\fIstr\fR \fB=\fR \fIsolvable\fR\fB\&.to_s\fR
.fi
.if n \{\
.RE
.\}
.sp
Same as calling the str() method\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<equality>\fR
\fBif (\fR\fI$solvable1\fR \fB==\fR \fI$solvable2\fR\fB)\fR
\fBif\fR \fIsolvable1\fR \fB==\fR \fIsolvable2\fR\fB:\fR
\fBif\fR \fIsolvable1\fR \fB==\fR \fIsolvable2\fR
.fi
.if n \{\
.RE
.\}
.sp
Two solvables are equal if they are part of the same pool and have the same ids\&.
.SH "THE DATAITERATOR CLASS"
.sp
Dataiterators can be used to do complex string searches or to iterate over arrays\&. They can be created via the constructors in the Pool, Repo, and Solvable classes\&. The Repo and Solvable constructors will limit the search to the repository or the specific package\&.
.SS "CONSTANTS"
.PP
\fBSEARCH_STRING\fR
.RS 4
Return a match if the search string matches the value\&.
.RE
.PP
\fBSEARCH_STRINGSTART\fR
.RS 4
Return a match if the value starts with the search string\&.
.RE
.PP
\fBSEARCH_STRINGEND\fR
.RS 4
Return a match if the value ends with the search string\&.
.RE
.PP
\fBSEARCH_SUBSTRING\fR
.RS 4
Return a match if the search string can be matched somewhere in the value\&.
.RE
.PP
\fBSEARCH_GLOB\fR
.RS 4
Do a glob match of the search string against the value\&.
.RE
.PP
\fBSEARCH_REGEX\fR
.RS 4
Do a regular expression match of the search string against the value\&.
.RE
.PP
\fBSEARCH_NOCASE\fR
.RS 4
Ignore case when matching strings\&. Works for all the above match types\&.
.RE
.PP
\fBSEARCH_FILES\fR
.RS 4
Match the complete filenames of the file list, not just the base name\&.
.RE
.PP
\fBSEARCH_COMPLETE_FILELIST\fR
.RS 4
When matching the file list, check every file of the package not just the subset from the primary metadata\&.
.RE
.PP
\fBSEARCH_CHECKSUMS\fR
.RS 4
Allow the matching of checksum entries\&.
.RE
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid prepend_keyname(Id\fR \fIkeyname\fR\fB)\fR;
\fI$di\fR\fB\->prepend_keyname(\fR\fI$keyname\fR\fB)\fR;
\fIdi\fR\fB\&.prepend_keyname(\fR\fIkeyname\fR\fB)\fR
\fIdi\fR\fB\&.prepend_keyname(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Do a sub\-search in the array stored in keyname\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid skip_solvable()\fR;
\fI$di\fR\fB\->skip_solvable()\fR;
\fIdi\fR\fB\&.skip_solvable()\fR
\fIdi\fR\fB\&.skip_solvable()\fR
.fi
.if n \{\
.RE
.\}
.sp
Stop matching the current solvable and advance to the next one\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<iteration>\fR
\fBfor my\fR \fI$d\fR \fB(\fR\fI@$di\fR\fB)\fR
\fBfor\fR \fId\fR \fBin\fR \fIdi\fR\fB:\fR
\fBfor\fR \fId\fR \fBin\fR \fIdi\fR
.fi
.if n \{\
.RE
.\}
.sp
Iterate through the matches\&. If there is a match, the object in d will be of type Datamatch\&.
.SH "THE DATAMATCH CLASS"
.sp
Objects of this type will be created for every value matched by a dataiterator\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBPool *pool;\fR                             /* read only */
\fI$d\fR\fB\->{pool}\fR
\fId\fR\fB\&.pool\fR
\fId\fR\fB\&.pool\fR
.fi
.if n \{\
.RE
.\}
.sp
Back pointer to pool\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRepo *repo;\fR                             /* read only */
\fI$d\fR\fB\->{repo}\fR
\fId\fR\fB\&.repo\fR
\fId\fR\fB\&.repo\fR
.fi
.if n \{\
.RE
.\}
.sp
The repository containing the matched object\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *solvable;\fR                     /* read only */
\fI$d\fR\fB\->{solvable}\fR
\fId\fR\fB\&.solvable\fR
\fId\fR\fB\&.solvable\fR
.fi
.if n \{\
.RE
.\}
.sp
The solvable containing the value that was matched\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId solvid;\fR                              /* read only */
\fI$d\fR\fB\->{solvid}\fR
\fId\fR\fB\&.solvid\fR
\fId\fR\fB\&.solvid\fR
.fi
.if n \{\
.RE
.\}
.sp
The id of the solvable that matched\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId\fR \fIkey_id\fR;
\fI$d\fR\fB\->{\fR\fIkey_id\fR\fB}\fR
\fId\fR\fB\&.key_id\fR
\fId\fR\fB\&.key_id\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *\fR\fIkey_idstr\fR;
\fI$d\fR\fB\->{\fR\fIkey_idstr\fR\fB}\fR
\fId\fR\fB\&.key_idstr\fR
\fId\fR\fB\&.key_idstr\fR
.fi
.if n \{\
.RE
.\}
.sp
The keyname that matched, either as id or string\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId\fR \fItype_id\fR;
\fI$d\fR\fB\->{\fR\fItype_id\fR\fB}\fR
\fId\fR\fB\&.type_id\fR
\fId\fR\fB\&.type_id\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *\fR\fItype_idstr\fR;
\fI$d\fR\fB\->{\fR\fItype_idstr\fR\fB}\fR;
\fId\fR\fB\&.type_idstr\fR
\fId\fR\fB\&.type_idstr\fR
.fi
.if n \{\
.RE
.\}
.sp
The key type of the value that was matched, either as id or string\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId\fR \fIid\fR;
\fI$d\fR\fB\->{id}\fR
\fId\fR\fB\&.id\fR
\fId\fR\fB\&.id\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId\fR \fIidstr\fR;
\fI$d\fR\fB\->{idstr}\fR
\fId\fR\fB\&.idstr\fR
\fId\fR\fB\&.idstr\fR
.fi
.if n \{\
.RE
.\}
.sp
The Id of the value that was matched (only valid for id types), either as id or string\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *\fR\fIstr\fR;
\fI$d\fR\fB\->{str}\fR
\fId\fR\fB\&.str\fR
\fId\fR\fB\&.str\fR
.fi
.if n \{\
.RE
.\}
.sp
The string value that was matched (only valid for string types)\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBunsigned long long\fR \fInum\fR;
\fI$d\fR\fB\->{num}\fR
\fId\fR\fB\&.num\fR
\fId\fR\fB\&.num\fR
.fi
.if n \{\
.RE
.\}
.sp
The numeric value that was matched (only valid for numeric types)\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBunsigned int\fR \fInum2\fR;
\fI$d\fR\fB\->{num2}\fR
\fId\fR\fB\&.num2\fR
\fId\fR\fB\&.num2\fR
.fi
.if n \{\
.RE
.\}
.sp
The secondary numeric value that was matched (only valid for types containing two values)\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBunsigned int\fR \fIbinary\fR;
\fI$d\fR\fB\->{binary}\fR
\fId\fR\fB\&.binary\fR
\fId\fR\fB\&.binary\fR
.fi
.if n \{\
.RE
.\}
.sp
The value in binary form, useful for checksums and other data that cannot be represented as a string\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDatapos pos()\fR;
my \fI$pos\fR \fB=\fR \fI$d\fR\fB\->pos()\fR;
\fIpos\fR \fB=\fR \fId\fR\fB\&.pos()\fR
\fIpos\fR \fB=\fR \fId\fR\fB\&.pos()\fR
.fi
.if n \{\
.RE
.\}
.sp
The position object of the current match\&. It can be used to do sub\-searches starting at the match (if it is of an array type)\&. See the Datapos class for more information\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDatapos parentpos()\fR;
my \fI$pos\fR \fB=\fR \fI$d\fR\fB\->parentpos()\fR;
\fIpos\fR \fB=\fR \fId\fR\fB\&.parentpos()\fR
\fIpos\fR \fB=\fR \fId\fR\fB\&.parentpos()\fR
.fi
.if n \{\
.RE
.\}
.sp
The position object of the array containing the current match\&. It can be used to do sub\-searches, see the Datapos class for more information\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<stringification>\fR
my \fI$str\fR \fB=\fR \fI$d\fR\fB\->str\fR;
\fIstr\fR \fB= str(\fR\fId\fR\fB)\fR
\fIstr\fR \fB=\fR \fId\fR\fB\&.to_s\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the stringification of the matched value\&. Stringification depends on the search flags, for file list entries it will return just the base name unless SEARCH_FILES is used, for checksums it will return an empty string unless SEARCH_CHECKSUMS is used\&. Numeric values are currently stringified to an empty string\&.
.SH "THE SELECTION CLASS"
.sp
Selections are a way to easily deal with sets of packages\&. There are multiple constructors to create them, the most useful is probably the select() method in the Pool class\&.
.SS "CONSTANTS"
.PP
\fBSELECTION_NAME\fR
.RS 4
Create the selection by matching package names\&.
.RE
.PP
\fBSELECTION_PROVIDES\fR
.RS 4
Create the selection by matching package provides\&.
.RE
.PP
\fBSELECTION_FILELIST\fR
.RS 4
Create the selection by matching package files\&.
.RE
.PP
\fBSELECTION_CANON\fR
.RS 4
Create the selection by matching the canonical representation of the package\&. This is normally a combination of the name, the version, and the architecture of a package\&.
.RE
.PP
\fBSELECTION_DOTARCH\fR
.RS 4
Allow an "\&.<architecture>" suffix when matching names or provides\&.
.RE
.PP
\fBSELECTION_REL\fR
.RS 4
Allow the specification of a relation when matching names or dependencies, e\&.g\&. "name >= 1\&.2"\&.
.RE
.PP
\fBSELECTION_GLOB\fR
.RS 4
Allow glob matching for package names, package provides, and file names\&.
.RE
.PP
\fBSELECTION_NOCASE\fR
.RS 4
Ignore case when matching package names, package provides, and file names\&.
.RE
.PP
\fBSELECTION_FLAT\fR
.RS 4
Return only one selection element describing the selected packages\&. The default is to create multiple elements for all globbed packages\&. Multiple elements are useful if you want to turn the selection into an install job, in that case you want an install job for every globbed package\&.
.RE
.PP
\fBSELECTION_SKIP_KIND\fR
.RS 4
Remove a "packagekind:" prefix from the package names\&.
.RE
.PP
\fBSELECTION_MATCH_DEPSTR\fR
.RS 4
When matching dependencies, do a string match on the result of dep2str instead of using the normal dependency intersect algorithm\&.
.RE
.PP
\fBSELECTION_INSTALLED_ONLY\fR
.RS 4
Limit the package search to installed packages\&.
.RE
.PP
\fBSELECTION_SOURCE_ONLY\fR
.RS 4
Limit the package search to source packages only\&.
.RE
.PP
\fBSELECTION_WITH_SOURCE\fR
.RS 4
Extend the package search to also match source packages\&. The default is only to match binary packages\&.
.RE
.PP
\fBSELECTION_WITH_DISABLED\fR
.RS 4
Extend the package search to also include disabled packages\&.
.RE
.PP
\fBSELECTION_WITH_BADARCH\fR
.RS 4
Extend the package search to also include packages that are not installable on the configured architecture\&.
.RE
.PP
\fBSELECTION_WITH_ALL\fR
.RS 4
Shortcut for selecting the three modifiers above\&.
.RE
.PP
\fBSELECTION_ADD\fR
.RS 4
Add the result of the match to the current selection instead of replacing it\&.
.RE
.PP
\fBSELECTION_SUBTRACT\fR
.RS 4
Remove the result of the match to the current selection instead of replacing it\&.
.RE
.PP
\fBSELECTION_FILTER\fR
.RS 4
Intersect the result of the match to the current selection instead of replacing it\&.
.RE
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBPool *pool;\fR                             /* read only */
\fI$d\fR\fB\->{pool}\fR
\fId\fR\fB\&.pool\fR
\fId\fR\fB\&.pool\fR
.fi
.if n \{\
.RE
.\}
.sp
Back pointer to pool\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint flags;\fR                              /* read only */
\fI$sel\fR\fB\->{flags}\fR
\fIflags\fR \fB=\fR \fIsel\fR\fB\&.flags\fR
\fIflags\fR \fB=\fR \fIsel\fR\fB\&.flags\fR
.fi
.if n \{\
.RE
.\}
.sp
The result flags of the selection\&. The flags are a subset of the ones used when creating the selection, they describe which method was used to get the result\&. For example, if you create the selection with \(lqSELECTION_NAME | SELECTION_PROVIDES\(rq, the resulting flags will either be SELECTION_NAME or SELECTION_PROVIDES depending if there was a package that matched the name or not\&. If there was no match at all, the flags will be zero\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool isempty()\fR
\fI$sel\fR\fB\->isempty()\fR
\fIsel\fR\fB\&.isempty()\fR
\fIsel\fR\fB\&.isempty?\fR
.fi
.if n \{\
.RE
.\}
.sp
Return true if the selection is empty, i\&.e\&. no package could be matched\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSelection clone(int\fR \fIflags\fR \fB= 0)\fR
my \fI$cloned\fR \fB=\fR \fI$sel\fR\fB\->clone()\fR;
\fIcloned\fR \fB=\fR \fIsel\fR\fB\&.clone()\fR
\fIcloned\fR \fB=\fR \fIsel\fR\fB\&.clone()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return a copy of a selection\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid filter(Selection *\fR\fIother\fR\fB)\fR
\fI$sel\fR\fB\->filter(\fR\fI$other\fR\fB)\fR;
\fIsel\fR\fB\&.filter(\fR\fIother\fR\fB)\fR
\fIsel\fR\fB\&.filter(\fR\fIother\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Intersect two selections\&. Packages will only stay in the selection if there are also included in the other selecting\&. Does an in\-place modification\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid add(Selection *\fR\fIother\fR\fB)\fR
\fI$sel\fR\fB\->add(\fR\fI$other\fR\fB)\fR;
\fIsel\fR\fB\&.add(\fR\fIother\fR\fB)\fR
\fIsel\fR\fB\&.add(\fR\fIother\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Build the union of two selections\&. All packages of the other selection will be added to the set of packages of the selection object\&. Does an in\-place modification\&. Note that the selection flags are no longer meaningful after the add operation\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid subtract(Selection *\fR\fIother\fR\fB)\fR
\fI$sel\fR\fB\->subtract(\fR\fI$other\fR\fB)\fR;
\fIsel\fR\fB\&.subtract(\fR\fIother\fR\fB)\fR
\fIsel\fR\fB\&.subtract(\fR\fIother\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Remove the packages of the other selection from the packages of the selection object\&. Does an in\-place modification\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid add_raw(Id\fR \fIhow\fR\fB, Id\fR \fIwhat\fR\fB)\fR
\fI$sel\fR\fB\->add_raw(\fR\fI$how\fR\fB,\fR \fI$what\fR\fB)\fR;
\fIsel\fR\fB\&.add_raw(\fR\fIhow\fR\fB,\fR \fIwhat\fR\fB)\fR
\fIsel\fR\fB\&.add_raw(\fR\fIhow\fR\fB,\fR \fIwhat\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add a raw element to the selection\&. Check the Job class for information about the how and what parameters\&. Note that the selection flags are no longer meaningful after the add_raw operation\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBJob *jobs(int\fR \fIaction\fR\fB)\fR
my \fI@jobs\fR \fB=\fR \fI$sel\fR\fB\->jobs(\fR\fI$action\fR\fB)\fR;
\fIjobs\fR \fB=\fR \fIsel\fR\fB\&.jobs(\fR\fIaction\fR\fB)\fR
\fIjobs\fR \fB=\fR \fIsel\fR\fB\&.jobs(\fR\fIaction\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Convert a selection into an array of Job objects\&. The action parameter is or\-ed to the \(lqhow\(rq part of the job, it describes the type of job (e\&.g\&. install, erase)\&. See the Job class for the action and action modifier constants\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *solvables()\fR
my \fI@solvables\fR \fB=\fR \fI$sel\fR\fB\->solvables()\fR;
\fIsolvables\fR \fB=\fR \fIsel\fR\fB\&.solvables()\fR
\fIsolvables\fR \fB=\fR \fIsel\fR\fB\&.solvables()\fR
.fi
.if n \{\
.RE
.\}
.sp
Convert a selection into an array of Solvable objects\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid select(const char *\fR\fIname\fR\fB, int\fR \fIflags\fR\fB)\fR
\fI$sel\fR\fB\->select(\fR\fI$name\fR\fB,\fR \fI$flags\fR\fB)\fR;
\fIsel\fR\fB\&.select(\fR\fIname\fR\fB,\fR \fIflags\fR\fB)\fR
\fIsel\fR\fB\&.select(\fR\fIname\fR\fB,\fR \fIflags\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Do a select operation and combine the result with the current selection\&. You can choose the desired combination method by using either the SELECTION_ADD, SELECTION_SUBTRACT, or SELECTION_FILTER flag\&. If none of the flags are used, SELECTION_FILTER|SELECTION_WITH_ALL is assumed\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid matchdeps(const char *\fR\fIname\fR\fB, int\fR \fIflags\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
\fI$sel\fR\fB\->matchdeps(\fR\fI$name\fR\fB,\fR \fI$flags\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIsel\fR\fB\&.matchdeps(\fR\fIname\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIsel\fR\fB\&.matchdeps(\fR\fIname\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Do a matchdeps operation and combine the result with the current selection\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid matchdepid(DepId\fR \fIdep\fR\fB, int\fR \fIflags\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
\fI$sel\fR\fB\->matchdepid(\fR\fI$dep\fR\fB,\fR \fI$flags\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIsel\fR\fB\&.matchdepid(\fR\fIdep\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIsel\fR\fB\&.matchdepid(\fR\fIdep\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Do a matchdepid operation and combine the result with the current selection\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid matchsolvable(Solvable\fR \fIsolvable\fR\fB, int\fR \fIflags\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
\fI$sel\fR\fB\->matchsolvable(\fR\fI$solvable\fR\fB,\fR \fI$flags\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIsel\fR\fB\&.matchsolvable(\fR\fIsolvable\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIsel\fR\fB\&.matchsolvable(\fR\fIsolvable\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Do a matchsolvable operation and combine the result with the current selection\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<stringification>\fR
my \fI$str\fR \fB=\fR \fI$sel\fR\fB\->str\fR;
\fIstr\fR \fB= str(\fR\fIsel\fR\fB)\fR
\fIstr\fR \fB=\fR \fIsel\fR\fB\&.to_s\fR
.fi
.if n \{\
.RE
.\}
.sp
Return a string describing the selection\&.
.SH "THE JOB CLASS"
.sp
Jobs are the way to specify to the dependency solver what to do\&. Most of the times jobs will get created by calling the jobs() method on a Selection object, but there is also a Job() constructor in the Pool class\&.
.SS "CONSTANTS"
.sp
Selection constants:
.PP
\fBSOLVER_SOLVABLE\fR
.RS 4
The \(lqwhat\(rq part is the id of a solvable\&.
.RE
.PP
\fBSOLVER_SOLVABLE_NAME\fR
.RS 4
The \(lqwhat\(rq part is the id of a package name\&.
.RE
.PP
\fBSOLVER_SOLVABLE_PROVIDES\fR
.RS 4
The \(lqwhat\(rq part is the id of a package provides\&.
.RE
.PP
\fBSOLVER_SOLVABLE_ONE_OF\fR
.RS 4
The \(lqwhat\(rq part is an offset into the \(lqwhatprovides\(rq data, created by calling the towhatprovides() pool method\&.
.RE
.PP
\fBSOLVER_SOLVABLE_REPO\fR
.RS 4
The \(lqwhat\(rq part is the id of a repository\&.
.RE
.PP
\fBSOLVER_SOLVABLE_ALL\fR
.RS 4
The \(lqwhat\(rq part is ignored, all packages are selected\&.
.RE
.PP
\fBSOLVER_SOLVABLE_SELECTMASK\fR
.RS 4
A mask containing all the above selection bits\&.
.RE
.sp
Action constants:
.PP
\fBSOLVER_NOOP\fR
.RS 4
Do nothing\&.
.RE
.PP
\fBSOLVER_INSTALL\fR
.RS 4
Install a package of the specified set of packages\&. It tries to install the best matching package (i\&.e\&. the highest version of the packages from the repositories with the highest priority)\&.
.RE
.PP
\fBSOLVER_ERASE\fR
.RS 4
Erase all of the packages from the specified set\&. If a package is not installed, erasing it will keep it from getting installed\&.
.RE
.PP
\fBSOLVER_UPDATE\fR
.RS 4
Update the matching installed packages to their best version\&. If none of the specified packages are installed, try to update the installed packages to the specified versions\&. See the section about targeted updates about more information\&.
.RE
.PP
\fBSOLVER_WEAKENDEPS\fR
.RS 4
Allow to break the dependencies of the matching packages\&. Handle with care\&.
.RE
.PP
\fBSOLVER_MULTIVERSION\fR
.RS 4
Mark the matched packages for multiversion install\&. If they get to be installed because of some other job, the installation will keep the old version of the package installed (for rpm this is done by using \(lq\-i\(rq instead of \(lq\-U\(rq)\&.
.RE
.PP
\fBSOLVER_LOCK\fR
.RS 4
Do not change the state of the matched packages, i\&.e\&. when they are installed they stay installed, if not they are not selected for installation\&.
.RE
.PP
\fBSOLVER_DISTUPGRADE\fR
.RS 4
Update the matching installed packages to the best version included in one of the repositories\&. After this operation, all come from one of the available repositories except orphaned packages\&. Orphaned packages are packages that have no relation to the packages in the repositories, i\&.e\&. no package in the repositories have the same name or obsolete the orphaned package\&. This action brings the installed packages in sync with the ones in the repository\&. By default it also turns of arch/vendor/version locking for the affected packages to simulate a fresh installation\&. This means that distupgrade can actually downgrade packages if only lower versions of a package are available in the repositories\&. You can tweak this behavior with the SOLVER_FLAG_DUP_ solver flags\&.
.RE
.PP
\fBSOLVER_DROP_ORPHANED\fR
.RS 4
Erase all the matching installed packages if they are orphaned\&. This only makes sense if there is a \(lqdistupgrade all packages\(rq job\&. The default is to erase orphaned packages only if they block the installation of other packages\&.
.RE
.PP
\fBSOLVER_VERIFY\fR
.RS 4
Fix dependency problems of matching installed packages\&. The default is to ignore dependency problems for installed packages\&.
.RE
.PP
\fBSOLVER_USERINSTALLED\fR
.RS 4
The matching installed packages are considered to be installed by a user, thus not installed to fulfill some dependency\&. This is needed input for the calculation of unneeded packages for jobs that have the SOLVER_CLEANDEPS flag set\&.
.RE
.PP
\fBSOLVER_ALLOWUNINSTALL\fR
.RS 4
Allow the solver to deinstall the matching installed packages if they get into the way of resolving a dependency\&. This is like the SOLVER_FLAG_ALLOW_UNINSTALL flag, but limited to a specific set of packages\&.
.RE
.PP
\fBSOLVER_FAVOR\fR
.RS 4
Prefer the specified packages if the solver encounters an alternative\&. If a job contains multiple matching favor/disfavor elements, the last one takes precedence\&.
.RE
.PP
\fBSOLVER_DISFAVOR\fR
.RS 4
Avoid the specified packages if the solver encounters an alternative\&. This can also be used to block recommended or supplemented packages from being installed\&.
.RE
.PP
\fBSOLVER_JOBMASK\fR
.RS 4
A mask containing all the above action bits\&.
.RE
.sp
Action modifier constants:
.PP
\fBSOLVER_WEAK\fR
.RS 4
Makes the job a weak job\&. The solver tries to fulfill weak jobs, but does not report a problem if it is not possible to do so\&.
.RE
.PP
\fBSOLVER_ESSENTIAL\fR
.RS 4
Makes the job an essential job\&. If there is a problem with the job, the solver will not propose to remove the job as one solution (unless all other solutions are also to remove essential jobs)\&.
.RE
.PP
\fBSOLVER_CLEANDEPS\fR
.RS 4
The solver will try to also erase all packages dragged in through dependencies when erasing the package\&. This needs SOLVER_USERINSTALLED jobs to maximize user satisfaction\&.
.RE
.PP
\fBSOLVER_FORCEBEST\fR
.RS 4
Insist on the best package for install, update, and distupgrade jobs\&. If this flag is not used, the solver will use the second\-best package if the best package cannot be installed for some reason\&. When this flag is used, the solver will generate a problem instead\&.
.RE
.PP
\fBSOLVER_TARGETED\fR
.RS 4
Forces targeted operation update and distupgrade jobs\&. See the section about targeted updates about more information\&.
.RE
.sp
Set constants\&.
.PP
\fBSOLVER_SETEV\fR
.RS 4
The job specified the exact epoch and version of the package set\&.
.RE
.PP
\fBSOLVER_SETEVR\fR
.RS 4
The job specified the exact epoch, version, and release of the package set\&.
.RE
.PP
\fBSOLVER_SETARCH\fR
.RS 4
The job specified the exact architecture of the packages from the set\&.
.RE
.PP
\fBSOLVER_SETVENDOR\fR
.RS 4
The job specified the exact vendor of the packages from the set\&.
.RE
.PP
\fBSOLVER_SETREPO\fR
.RS 4
The job specified the exact repository of the packages from the set\&.
.RE
.PP
\fBSOLVER_SETNAME\fR
.RS 4
The job specified the exact name of the packages from the set\&.
.RE
.PP
\fBSOLVER_NOAUTOSET\fR
.RS 4
Turn of automatic set flag generation for SOLVER_SOLVABLE jobs\&.
.RE
.PP
\fBSOLVER_SETMASK\fR
.RS 4
A mask containing all the above set bits\&.
.RE
.sp
See the section about set bits for more information\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBPool *pool;\fR                             /* read only */
\fI$job\fR\fB\->{pool}\fR
\fId\fR\fB\&.pool\fR
\fId\fR\fB\&.pool\fR
.fi
.if n \{\
.RE
.\}
.sp
Back pointer to pool\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId how;\fR                                 /* read/write */
\fI$job\fR\fB\->{how}\fR
\fId\fR\fB\&.how\fR
\fId\fR\fB\&.how\fR
.fi
.if n \{\
.RE
.\}
.sp
Union of the selection, action, action modifier, and set flags\&. The selection part describes the semantics of the \(lqwhat\(rq Id\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId what;\fR                                /* read/write */
\fI$job\fR\fB\->{what}\fR
\fId\fR\fB\&.what\fR
\fId\fR\fB\&.what\fR
.fi
.if n \{\
.RE
.\}
.sp
Id describing the set of packages, the meaning depends on the selection part of the \(lqhow\(rq attribute\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *solvables()\fR
my \fI@solvables\fR \fB=\fR \fI$job\fR\fB\->solvables()\fR;
\fIsolvables\fR \fB=\fR \fIjob\fR\fB\&.solvables()\fR
\fIsolvables\fR \fB=\fR \fIjob\fR\fB\&.solvables()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the set of solvables of the job as an array of Solvable objects\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool isemptyupdate()\fR;
\fI$job\fR\fB\->isemptyupdate()\fR
\fIjob\fR\fB\&.isemptyupdate()\fR
\fIjob\fR\fB\&.isemptyupdate?\fR
.fi
.if n \{\
.RE
.\}
.sp
Convenience function to find out if the job describes an update job with no matching packages, i\&.e\&. a job that does nothing\&. Some package managers like \(lqzypper\(rq like to turn those jobs into install jobs, i\&.e\&. an update of a not\-installed package will result into the installation of the package\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<stringification>\fR
my \fI$str\fR \fB=\fR \fI$job\fR\fB\->str\fR;
\fIstr\fR \fB= str(\fR\fIjob\fR\fB)\fR
\fIstr\fR \fB=\fR \fIjob\fR\fB\&.to_s\fR
.fi
.if n \{\
.RE
.\}
.sp
Return a string describing the job\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<equality>\fR
\fBif (\fR\fI$job1\fR \fB==\fR \fI$job2\fR\fB)\fR
\fBif\fR \fIjob1\fR \fB==\fR \fIjob2\fR\fB:\fR
\fBif\fR \fIjob1\fR \fB==\fR \fIjob2\fR
.fi
.if n \{\
.RE
.\}
.sp
Two jobs are equal if they belong to the same pool and both the \(lqhow\(rq and the \(lqwhat\(rq attributes are the same\&.
.SS "TARGETED UPDATES"
.sp
Libsolv has two modes for upgrades and distupgrade: targeted and untargeted\&. Untargeted mode means that the installed packages from the specified set will be updated to the best version\&. Targeted means that packages that can be updated to a package in the specified set will be updated to the best package of the set\&.
.sp
Here\(cqs an example to explain the subtle difference\&. Suppose that you have package A installed in version "1\&.1", "A\-1\&.2" is available in one of the repositories and there is also package "B" that obsoletes package A\&.
.sp
An untargeted update of "A" will update the installed "A\-1\&.1" to package "B", because that is the newest version (B obsoletes A and is thus newer)\&.
.sp
A targeted update of "A" will update "A\-1\&.1" to "A\-1\&.2", as the set of packages contains both "A\-1\&.1" and "A\-1\&.2", and "A\-1\&.2" is the newer one\&.
.sp
An untargeted update of "B" will do nothing, as "B" is not installed\&.
.sp
An targeted update of "B" will update "A\-1\&.1" to "B"\&.
.sp
Note that the default is to do "auto\-targeting", thus if the specified set of packages does not include an installed package, the solver will assume targeted operation even if SOLVER_TARGETED is not used\&.
.sp
This mostly matches the intent of the user, with one exception: In the example above, an update of "A\-1\&.2" will update "A\-1\&.1" to "A\-1\&.2" (targeted mode), but a second update of "A\-1\&.2" will suddenly update to "B", as untargeted mode is chosen because "A\-1\&.2" is now installed\&.
.sp
If you want to have full control over when targeting mode is chosen, turn off auto\-targeting with the SOLVER_FLAG_NO_AUTOTARGET solver option\&. In that case, all updates are considered to be untargeted unless they include the SOLVER_TARGETED flag\&.
.SS "SET BITS"
.sp
Set bits specify which parts of the specified packages where specified by the user\&. It is used by the solver when checking if an operation is allowed or not\&. For example, the solver will normally not allow the downgrade of an installed package\&. But it will not report a problem if the SOLVER_SETEVR flag is used, as it then assumes that the user specified the exact version and thus knows what he is doing\&.
.sp
So if a package "screen\-1\-1" is installed for the x86_64 architecture and version "2\-1" is only available for the i586 architecture, installing package "screen\-2\&.1" will ask the user for confirmation because of the different architecture\&. When using the Selection class to create jobs the set bits are automatically added, e\&.g\&. selecting \(lqscreen\&.i586\(rq will automatically add SOLVER_SETARCH, and thus no problem will be reported\&.
.SH "THE SOLVER CLASS"
.sp
Dependency solving is what this library is about\&. A solver object is needed for solving to store the result of the solver run\&. The solver object can be used multiple times for different jobs, reusing it allows the solver to re\-use the dependency rules it already computed\&.
.SS "CONSTANTS"
.sp
Flags to modify some of the solver\(cqs behavior:
.PP
\fBSOLVER_FLAG_ALLOW_DOWNGRADE\fR
.RS 4
Allow the solver to downgrade packages without asking for confirmation (i\&.e\&. reporting a problem)\&.
.RE
.PP
\fBSOLVER_FLAG_ALLOW_ARCHCHANGE\fR
.RS 4
Allow the solver to change the architecture of an installed package without asking for confirmation\&. Note that changes to/from noarch are always considered to be allowed\&.
.RE
.PP
\fBSOLVER_FLAG_ALLOW_VENDORCHANGE\fR
.RS 4
Allow the solver to change the vendor of an installed package without asking for confirmation\&. Each vendor is part of one or more vendor equivalence classes, normally installed packages may only change their vendor if the new vendor shares at least one equivalence class\&.
.RE
.PP
\fBSOLVER_FLAG_ALLOW_NAMECHANGE\fR
.RS 4
Allow the solver to change the name of an installed package, i\&.e\&. install a package with a different name that obsoletes the installed package\&. This option is on by default\&.
.RE
.PP
\fBSOLVER_FLAG_ALLOW_UNINSTALL\fR
.RS 4
Allow the solver to erase installed packages to fulfill the jobs\&. This flag also includes the above flags\&. You may want to set this flag if you only have SOLVER_ERASE jobs, as in that case it\(cqs better for the user to check the transaction overview instead of approving every single package that needs to be erased\&.
.RE
.PP
\fBSOLVER_FLAG_DUP_ALLOW_DOWNGRADE\fR
.RS 4
Like SOLVER_FLAG_ALLOW_DOWNGRADE, but used in distupgrade mode\&.
.RE
.PP
\fBSOLVER_FLAG_DUP_ALLOW_ARCHCHANGE\fR
.RS 4
Like SOLVER_FLAG_ALLOW_ARCHCHANGE, but used in distupgrade mode\&.
.RE
.PP
\fBSOLVER_FLAG_DUP_ALLOW_VENDORCHANGE\fR
.RS 4
Like SOLVER_FLAG_ALLOW_VENDORCHANGE, but used in distupgrade mode\&.
.RE
.PP
\fBSOLVER_FLAG_DUP_ALLOW_NAMECHANGE\fR
.RS 4
Like SOLVER_FLAG_ALLOW_NAMECHANGE, but used in distupgrade mode\&.
.RE
.PP
\fBSOLVER_FLAG_NO_UPDATEPROVIDE\fR
.RS 4
If multiple packages obsolete an installed package, the solver checks the provides of every such package and ignores all packages that do not provide the installed package name\&. Thus, you can have an official update candidate that provides the old name, and other packages that also obsolete the package but are not considered for updating\&. If you cannot use this feature, you can turn it off by setting this flag\&.
.RE
.PP
\fBSOLVER_FLAG_NEED_UPDATEPROVIDE\fR
.RS 4
This is somewhat the opposite of SOLVER_FLAG_NO_UPDATEPROVIDE: Only packages that provide the installed package names are considered for updating\&.
.RE
.PP
\fBSOLVER_FLAG_SPLITPROVIDES\fR
.RS 4
Make the solver aware of special provides of the form \(lq<packagename>:<path>\(rq used in SUSE systems to support package splits\&.
.RE
.PP
\fBSOLVER_FLAG_IGNORE_RECOMMENDED\fR
.RS 4
Do not process optional (aka weak) dependencies\&.
.RE
.PP
\fBSOLVER_FLAG_ADD_ALREADY_RECOMMENDED\fR
.RS 4
Install recommended or supplemented packages even if they have no connection to the current transaction\&. You can use this feature to implement a simple way for the user to install new recommended packages that were not available in the past\&.
.RE
.PP
\fBSOLVER_FLAG_NO_INFARCHCHECK\fR
.RS 4
Turn off the inferior architecture checking that is normally done by the solver\&. Normally, the solver allows only the installation of packages from the "best" architecture if a package is available for multiple architectures\&.
.RE
.PP
\fBSOLVER_FLAG_BEST_OBEY_POLICY\fR
.RS 4
Make the SOLVER_FORCEBEST job option consider only packages that meet the policies for installed packages, i\&.e\&. no downgrades, no architecture change, no vendor change (see the first flags of this section)\&. If the flag is not specified, the solver will enforce the installation of the best package ignoring the installed packages, which may conflict with the set policy\&.
.RE
.PP
\fBSOLVER_FLAG_NO_AUTOTARGET\fR
.RS 4
Do not enable auto\-targeting up update and distupgrade jobs\&. See the section on targeted updates for more information\&.
.RE
.PP
\fBSOLVER_FLAG_KEEP_ORPHANS\fR
.RS 4
Do not allow orphaned packages to be deinstalled if they get in the way of resolving other packages\&.
.RE
.PP
\fBSOLVER_FLAG_BREAK_ORPHANS\fR
.RS 4
Ignore dependencies of orphaned packages that get in the way of resolving non\-orphaned ones\&. Setting the flag might result in no longer working packages in case they are orphaned\&.
.RE
.PP
\fBSOLVER_FLAG_FOCUS_INSTALLED\fR
.RS 4
Resolve installed packages before resolving the given jobs\&. Setting this flag means that the solver will prefer picking a package version that fits the other installed packages over updating installed packages\&.
.RE
.PP
\fBSOLVER_FLAG_FOCUS_BEST\fR
.RS 4
First resolve the given jobs, then the dependencies of the resulting packages, then resolve all already installed packages\&. This will result in more packages being updated as when the flag is not used\&.
.RE
.PP
\fBSOLVER_FLAG_INSTALL_ALSO_UPDATES\fR
.RS 4
Update the package if a job is already fulfilled by an installed package\&.
.RE
.PP
\fBSOLVER_FLAG_YUM_OBSOLETES\fR
.RS 4
Turn on yum\-like package split handling\&. See the yum documentation for more details\&.
.RE
.PP
\fBSOLVER_FLAG_URPM_REORDER\fR
.RS 4
Turn on urpm like package reordering for kernel packages\&. See the urpm documentation for more details\&.
.RE
.sp
Basic rule types:
.PP
\fBSOLVER_RULE_UNKNOWN\fR
.RS 4
A rule of an unknown class\&. You should never encounter those\&.
.RE
.PP
\fBSOLVER_RULE_PKG\fR
.RS 4
A package dependency rule\&.
.RE
.PP
\fBSOLVER_RULE_UPDATE\fR
.RS 4
A rule to implement the update policy of installed packages\&. Every installed package has an update rule that consists of the packages that may replace the installed package\&.
.RE
.PP
\fBSOLVER_RULE_FEATURE\fR
.RS 4
Feature rules are fallback rules used when an update rule is disabled\&. They include all packages that may replace the installed package ignoring the update policy, i\&.e\&. they contain downgrades, arch changes and so on\&. Without them, the solver would simply erase installed packages if their update rule gets disabled\&.
.RE
.PP
\fBSOLVER_RULE_JOB\fR
.RS 4
Job rules implement the job given to the solver\&.
.RE
.PP
\fBSOLVER_RULE_DISTUPGRADE\fR
.RS 4
These are simple negative assertions that make sure that only packages are kept that are also available in one of the repositories\&.
.RE
.PP
\fBSOLVER_RULE_INFARCH\fR
.RS 4
Infarch rules are also negative assertions, they disallow the installation of packages when there are packages of the same name but with a better architecture\&.
.RE
.PP
\fBSOLVER_RULE_CHOICE\fR
.RS 4
Choice rules are used to make sure that the solver prefers updating to installing different packages when some dependency is provided by multiple packages with different names\&. The solver may always break choice rules, so you will not see them when a problem is found\&.
.RE
.PP
\fBSOLVER_RULE_LEARNT\fR
.RS 4
These rules are generated by the solver to keep it from running into the same problem multiple times when it has to backtrack\&. They are the main reason why a sat solver is faster than other dependency solver implementations\&.
.RE
.sp
Special dependency rule types:
.PP
\fBSOLVER_RULE_PKG_NOT_INSTALLABLE\fR
.RS 4
This rule was added to prevent the installation of a package of an architecture that does not work on the system\&.
.RE
.PP
\fBSOLVER_RULE_PKG_NOTHING_PROVIDES_DEP\fR
.RS 4
The package contains a required dependency which was not provided by any package\&.
.RE
.PP
\fBSOLVER_RULE_PKG_REQUIRES\fR
.RS 4
Similar to SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP, but in this case some packages provided the dependency but none of them could be installed due to other dependency issues\&.
.RE
.PP
\fBSOLVER_RULE_PKG_SELF_CONFLICT\fR
.RS 4
The package conflicts with itself\&. This is not allowed by older rpm versions\&.
.RE
.PP
\fBSOLVER_RULE_PKG_CONFLICTS\fR
.RS 4
To fulfill the dependencies two packages need to be installed, but one of the packages contains a conflict with the other one\&.
.RE
.PP
\fBSOLVER_RULE_PKG_SAME_NAME\fR
.RS 4
The dependencies can only be fulfilled by multiple versions of a package, but installing multiple versions of the same package is not allowed\&.
.RE
.PP
\fBSOLVER_RULE_PKG_OBSOLETES\fR
.RS 4
To fulfill the dependencies two packages need to be installed, but one of the packages obsoletes the other one\&.
.RE
.PP
\fBSOLVER_RULE_PKG_IMPLICIT_OBSOLETES\fR
.RS 4
To fulfill the dependencies two packages need to be installed, but one of the packages has provides a dependency that is obsoleted by the other one\&. See the POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES flag\&.
.RE
.PP
\fBSOLVER_RULE_PKG_INSTALLED_OBSOLETES\fR
.RS 4
To fulfill the dependencies a package needs to be installed that is obsoleted by an installed package\&. See the POOL_FLAG_NOINSTALLEDOBSOLETES flag\&.
.RE
.PP
\fBSOLVER_RULE_JOB_NOTHING_PROVIDES_DEP\fR
.RS 4
The user asked for installation of a package providing a specific dependency, but no available package provides it\&.
.RE
.PP
\fBSOLVER_RULE_JOB_UNKNOWN_PACKAGE\fR
.RS 4
The user asked for installation of a package with a specific name, but no available package has that name\&.
.RE
.PP
\fBSOLVER_RULE_JOB_PROVIDED_BY_SYSTEM\fR
.RS 4
The user asked for the erasure of a dependency that is provided by the system (i\&.e\&. for special hardware or language dependencies), this cannot be done with a job\&.
.RE
.PP
\fBSOLVER_RULE_JOB_UNSUPPORTED\fR
.RS 4
The user asked for something that is not yet implemented, e\&.g\&. the installation of all packages at once\&.
.RE
.sp
Policy error constants
.PP
\fBPOLICY_ILLEGAL_DOWNGRADE\fR
.RS 4
The solver ask for permission before downgrading packages\&.
.RE
.PP
\fBPOLICY_ILLEGAL_ARCHCHANGE\fR
.RS 4
The solver ask for permission before changing the architecture of installed packages\&.
.RE
.PP
\fBPOLICY_ILLEGAL_VENDORCHANGE\fR
.RS 4
The solver ask for permission before changing the vendor of installed packages\&.
.RE
.PP
\fBPOLICY_ILLEGAL_NAMECHANGE\fR
.RS 4
The solver ask for permission before replacing an installed packages with a package that has a different name\&.
.RE
.sp
Solution element type constants
.PP
\fBSOLVER_SOLUTION_JOB\fR
.RS 4
The problem can be solved by removing the specified job\&.
.RE
.PP
\fBSOLVER_SOLUTION_POOLJOB\fR
.RS 4
The problem can be solved by removing the specified job that is defined in the pool\&.
.RE
.PP
\fBSOLVER_SOLUTION_INFARCH\fR
.RS 4
The problem can be solved by allowing the installation of the specified package with an inferior architecture\&.
.RE
.PP
\fBSOLVER_SOLUTION_DISTUPGRADE\fR
.RS 4
The problem can be solved by allowing to keep the specified package installed\&.
.RE
.PP
\fBSOLVER_SOLUTION_BEST\fR
.RS 4
The problem can be solved by allowing to install the specified package that is not the best available package\&.
.RE
.PP
\fBSOLVER_SOLUTION_ERASE\fR
.RS 4
The problem can be solved by allowing to erase the specified package\&.
.RE
.PP
\fBSOLVER_SOLUTION_REPLACE\fR
.RS 4
The problem can be solved by allowing to replace the package with some other package\&.
.RE
.PP
\fBSOLVER_SOLUTION_REPLACE_DOWNGRADE\fR
.RS 4
The problem can be solved by allowing to replace the package with some other package that has a lower version\&.
.RE
.PP
\fBSOLVER_SOLUTION_REPLACE_ARCHCHANGE\fR
.RS 4
The problem can be solved by allowing to replace the package with some other package that has a different architecture\&.
.RE
.PP
\fBSOLVER_SOLUTION_REPLACE_VENDORCHANGE\fR
.RS 4
The problem can be solved by allowing to replace the package with some other package that has a different vendor\&.
.RE
.PP
\fBSOLVER_SOLUTION_REPLACE_NAMECHANGE\fR
.RS 4
The problem can be solved by allowing to replace the package with some other package that has a different name\&.
.RE
.sp
Reason constants
.PP
\fBSOLVER_REASON_UNRELATED\fR
.RS 4
The package status did not change as it was not related to any job\&.
.RE
.PP
\fBSOLVER_REASON_UNIT_RULE\fR
.RS 4
The package was installed/erased/kept because of a unit rule, i\&.e\&. a rule where all literals but one were false\&.
.RE
.PP
\fBSOLVER_REASON_KEEP_INSTALLED\fR
.RS 4
The package was chosen when trying to keep as many packages installed as possible\&.
.RE
.PP
\fBSOLVER_REASON_RESOLVE_JOB\fR
.RS 4
The decision happened to fulfill a job rule\&.
.RE
.PP
\fBSOLVER_REASON_UPDATE_INSTALLED\fR
.RS 4
The decision happened to fulfill a package update request\&.
.RE
.PP
\fBSOLVER_REASON_CLEANDEPS_ERASE\fR
.RS 4
The package was erased when cleaning up dependencies from other erased packages\&.
.RE
.PP
\fBSOLVER_REASON_RESOLVE\fR
.RS 4
The package was installed to fulfill package dependencies\&.
.RE
.PP
\fBSOLVER_REASON_WEAKDEP\fR
.RS 4
The package was installed because of a weak dependency (Recommends or Supplements)\&.
.RE
.PP
\fBSOLVER_REASON_RESOLVE_ORPHAN\fR
.RS 4
The decision about the package was made when deciding the fate of orphaned packages\&.
.RE
.PP
\fBSOLVER_REASON_RECOMMENDED\fR
.RS 4
This is a special case of SOLVER_REASON_WEAKDEP\&.
.RE
.PP
\fBSOLVER_REASON_SUPPLEMENTED\fR
.RS 4
This is a special case of SOLVER_REASON_WEAKDEP\&.
.RE
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBPool *pool;\fR                             /* read only */
\fI$job\fR\fB\->{pool}\fR
\fId\fR\fB\&.pool\fR
\fId\fR\fB\&.pool\fR
.fi
.if n \{\
.RE
.\}
.sp
Back pointer to pool\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint set_flag(int\fR \fIflag\fR\fB, int\fR \fIvalue\fR\fB)\fR
my \fI$oldvalue\fR \fB=\fR \fI$solver\fR\fB\->set_flag(\fR\fI$flag\fR\fB,\fR \fI$value\fR\fB)\fR;
\fIoldvalue\fR \fB=\fR \fIsolver\fR\fB\&.set_flag(\fR\fIflag\fR\fB,\fR \fIvalue\fR\fB)\fR
\fIoldvalue\fR \fB=\fR \fIsolver\fR\fB\&.set_flag(\fR\fIflag\fR\fB,\fR \fIvalue\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint get_flag(int\fR \fIflag\fR\fB)\fR
my \fI$value\fR \fB=\fR \fI$solver\fR\fB\->get_flag(\fR\fI$flag\fR\fB)\fR;
\fIvalue\fR \fB=\fR \fIsolver\fR\fB\&.get_flag(\fR\fIflag\fR\fB)\fR
\fIvalue\fR \fB=\fR \fIsolver\fR\fB\&.get_flag(\fR\fIflag\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Set/get a solver specific flag\&. The flags define the policies the solver has to obey\&. The flags are explained in the CONSTANTS section of this class\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBProblem *solve(Job *\fR\fIjobs\fR\fB)\fR
my \fI@problems\fR \fB=\fR \fI$solver\fR\fB\->solve(\e\fR\fI@jobs\fR\fB)\fR;
\fIproblems\fR \fB=\fR \fIsolver\fR\fB\&.solve(\fR\fIjobs\fR\fB)\fR
\fIproblems\fR \fB=\fR \fIsolver\fR\fB\&.solve(\fR\fIjobs\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Solve a problem specified in the job list (plus the jobs defined in the pool)\&. Returns an array of problems that need user interaction, or an empty array if no problems were encountered\&. See the Problem class on how to deal with problems\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBTransaction transaction()\fR
my \fI$trans\fR \fB=\fR \fI$solver\fR\fB\->transaction()\fR;
\fItrans\fR \fB=\fR \fIsolver\fR\fB\&.transaction()\fR
\fItrans\fR \fB=\fR \fIsolver\fR\fB\&.transaction()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the transaction to implement the calculated package changes\&. A transaction is available even if problems were found, this is useful for interactive user interfaces that show both the job result and the problems\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint\fR \fIreason\fR \fB= describe_decision(Solvable *\fR\fIs\fR\fB, Rule *\fR\fIOUTPUT\fR\fB)\fR
my \fB(\fR\fI$reason\fR\fB,\fR \fI$rule\fR\fB) =\fR \fI$solver\fR\fB\->describe_decision(\fR\fI$solvable\fR\fB)\fR;
\fB(\fR\fIreason\fR\fB,\fR \fIrule\fR\fB) =\fR \fIsolver\fR\fB\&.describe_decision(\fR\fIsolvable\fR\fB)\fR
\fB(\fR\fIreason\fR\fB,\fR \fIrule\fR\fB) =\fR \fIsolver\fR\fB\&.describe_decision(\fR\fIsolvable\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the reason why a specific solvable was installed or erased\&. For most of the reasons the rule that triggered the decision is also returned\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *get_recommended(bool\fR \fInoselected\fR\fB=0)\fR;
my \fI@solvables\fR \fB=\fR \fI$solver\fR\fB\->get_recommended()\fR;
\fIsolvables\fR \fB=\fR \fIsolver\fR\fB\&.get_recommended()\fR
\fIsolvables\fR \fB=\fR \fIsolver\fR\fB\&.get_recommended()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return all solvables that are recommended by the solver run result\&. This includes solvables included in the result, set noselected if you want to filter those\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *get_suggested(bool\fR \fInoselected\fR\fB=0)\fR;
my \fI@solvables\fR \fB=\fR \fI$solver\fR\fB\->get_suggested()\fR;
\fIsolvables\fR \fB=\fR \fIsolver\fR\fB\&.get_suggested()\fR
\fIsolvables\fR \fB=\fR \fIsolver\fR\fB\&.get_suggested()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return all solvables that are suggested by the solver run result\&. This includes solvables included in the result, set noselected if you want to filter those\&.
.SH "THE PROBLEM CLASS"
.sp
Problems are the way of the solver to interact with the user\&. You can simply list all problems and terminate your program, but a better way is to present solutions to the user and let him pick the ones he likes\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolver *solv;\fR                           /* read only */
\fI$problem\fR\fB\->{solv}\fR
\fIproblem\fR\fB\&.solv\fR
\fIproblem\fR\fB\&.solv\fR
.fi
.if n \{\
.RE
.\}
.sp
Back pointer to solver object\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId id;\fR                                  /* read only */
\fI$problem\fR\fB\->{id}\fR
\fIproblem\fR\fB\&.id\fR
\fIproblem\fR\fB\&.id\fR
.fi
.if n \{\
.RE
.\}
.sp
Id of the problem\&. The first problem has Id 1, they are numbered consecutively\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRule findproblemrule()\fR
my \fI$probrule\fR \fB=\fR \fI$problem\fR\fB\->findproblemrule()\fR;
\fIprobrule\fR \fB=\fR \fIproblem\fR\fB\&.findproblemrule()\fR
\fIprobrule\fR \fB=\fR \fIproblem\fR\fB\&.findproblemrule()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the rule that caused the problem\&. Of course in most situations there is no single responsible rule, but many rules that interconnect with each created the problem\&. Nevertheless, the solver uses some heuristic approach to find a rule that somewhat describes the problem best to the user\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRule *findallproblemrules(bool\fR \fIunfiltered\fR \fB= 0)\fR
my \fI@probrules\fR \fB=\fR \fI$problem\fR\fB\->findallproblemrules()\fR;
\fIprobrules\fR \fB=\fR \fIproblem\fR\fB\&.findallproblemrules()\fR
\fIprobrules\fR \fB=\fR \fIproblem\fR\fB\&.findallproblemrules()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return all rules responsible for the problem\&. The returned set of rules contains all the needed information why there was a problem, but it\(cqs hard to present them to the user in a sensible way\&. The default is to filter out all update and job rules (unless the returned rules only consist of those types)\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolution *solutions()\fR
my \fI@solutions\fR \fB=\fR \fI$problem\fR\fB\->solutions()\fR;
\fIsolutions\fR \fB=\fR \fIproblem\fR\fB\&.solutions()\fR
\fIsolutions\fR \fB=\fR \fIproblem\fR\fB\&.solutions()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return an array containing multiple possible solutions to fix the problem\&. See the solution class for more information\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint solution_count()\fR
my \fI$cnt\fR \fB=\fR \fI$problem\fR\fB\->solution_count()\fR;
\fIcnt\fR \fB=\fR \fIproblem\fR\fB\&.solution_count()\fR
\fIcnt\fR \fB=\fR \fIproblem\fR\fB\&.solution_count()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the number of solutions without creating solution objects\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<stringification>\fR
my \fI$str\fR \fB=\fR \fI$problem\fR\fB\->str\fR;
\fIstr\fR \fB= str(\fR\fIproblem\fR\fB)\fR
\fIstr\fR \fB=\fR \fIproblem\fR\fB\&.to_s\fR
.fi
.if n \{\
.RE
.\}
.sp
Return a string describing the problem\&. This is a convenience function, it is a shorthand for calling findproblemrule(), then ruleinfo() on the problem rule and problemstr() on the ruleinfo object\&.
.SH "THE RULE CLASS"
.sp
Rules are the basic block of sat solving\&. Each package dependency gets translated into one or multiple rules\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolver *solv;\fR                           /* read only */
\fI$rule\fR\fB\->{solv}\fR
\fIrule\fR\fB\&.solv\fR
\fIrule\fR\fB\&.solv\fR
.fi
.if n \{\
.RE
.\}
.sp
Back pointer to solver object\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId id;\fR                                  /* read only */
\fI$rule\fR\fB\->{id}\fR
\fIrule\fR\fB\&.id\fR
\fIrule\fR\fB\&.id\fR
.fi
.if n \{\
.RE
.\}
.sp
The id of the rule\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint type;\fR                               /* read only */
\fI$rule\fR\fB\->{type}\fR
\fIrule\fR\fB\&.type\fR
\fIrule\fR\fB\&.type\fR
.fi
.if n \{\
.RE
.\}
.sp
The basic type of the rule\&. See the constant section of the solver class for the type list\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRuleinfo info()\fR
my \fI$ruleinfo\fR \fB=\fR \fI$rule\fR\fB\->info()\fR;
\fIruleinfo\fR \fB=\fR \fIrule\fR\fB\&.info()\fR
\fIruleinfo\fR \fB=\fR \fIrule\fR\fB\&.info()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return a Ruleinfo object that contains information about why the rule was created\&. But see the allinfos() method below\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRuleinfo *allinfos()\fR
my \fI@ruleinfos\fR \fB=\fR \fI$rule\fR\fB\->allinfos()\fR;
\fIruleinfos\fR \fB=\fR \fIrule\fR\fB\&.allinfos()\fR
\fIruleinfos\fR \fB=\fR \fIrule\fR\fB\&.allinfos()\fR
.fi
.if n \{\
.RE
.\}
.sp
As the same dependency rule can get created because of multiple dependencies, one Ruleinfo is not enough to describe the reason\&. Thus the allinfos() method returns an array of all infos about a rule\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<equality>\fR
\fBif (\fR\fI$rule1\fR \fB==\fR \fI$rule2\fR\fB)\fR
\fBif\fR \fIrule1\fR \fB==\fR \fIrule2\fR\fB:\fR
\fBif\fR \fIrule1\fR \fB==\fR \fIrule2\fR
.fi
.if n \{\
.RE
.\}
.sp
Two rules are equal if they belong to the same solver and have the same id\&.
.SH "THE RULEINFO CLASS"
.sp
A Ruleinfo describes one reason why a rule was created\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolver *solv;\fR                           /* read only */
\fI$ruleinfo\fR\fB\->{solv}\fR
\fIruleinfo\fR\fB\&.solv\fR
\fIruleinfo\fR\fB\&.solv\fR
.fi
.if n \{\
.RE
.\}
.sp
Back pointer to solver object\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint type;\fR                               /* read only */
\fI$ruleinfo\fR\fB\->{type}\fR
\fIruleinfo\fR\fB\&.type\fR
\fIruleinfo\fR\fB\&.type\fR
.fi
.if n \{\
.RE
.\}
.sp
The type of the ruleinfo\&. See the constant section of the solver class for the rule type list and the special type list\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDep *dep;\fR                               /* read only */
\fI$ruleinfo\fR\fB\->{dep}\fR
\fIruleinfo\fR\fB\&.dep\fR
\fIruleinfo\fR\fB\&.dep\fR
.fi
.if n \{\
.RE
.\}
.sp
The dependency leading to the creation of the rule\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDep *dep_id;\fR                            /* read only */
\fI$ruleinfo\fR\fB\->{\*(Aqdep_id\*(Aq}\fR
\fIruleinfo\fR\fB\&.dep_id\fR
\fIruleinfo\fR\fB\&.dep_id\fR
.fi
.if n \{\
.RE
.\}
.sp
The Id of the dependency leading to the creation of the rule, or zero\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *solvable;\fR                     /* read only */
\fI$ruleinfo\fR\fB\->{solvable}\fR
\fIruleinfo\fR\fB\&.solvable\fR
\fIruleinfo\fR\fB\&.solvable\fR
.fi
.if n \{\
.RE
.\}
.sp
The involved Solvable, e\&.g\&. the one containing the dependency\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *othersolvable;\fR                /* read only */
\fI$ruleinfo\fR\fB\->{othersolvable}\fR
\fIruleinfo\fR\fB\&.othersolvable\fR
\fIruleinfo\fR\fB\&.othersolvable\fR
.fi
.if n \{\
.RE
.\}
.sp
The other involved Solvable (if any), e\&.g\&. the one containing providing the dependency for conflicts\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *problemstr()\fR;
my \fI$str\fR \fB=\fR \fI$ruleinfo\fR\fB\->problemstr()\fR;
\fIstr\fR \fB=\fR \fIruleinfo\fR\fB\&.problemstr()\fR
\fIstr\fR \fB=\fR \fIruleinfo\fR\fB\&.problemstr()\fR
.fi
.if n \{\
.RE
.\}
.sp
A string describing the ruleinfo from a problem perspective\&. This probably only makes sense if the rule is part of a problem\&.
.SH "THE SOLUTION CLASS"
.sp
A solution solves one specific problem\&. It consists of multiple solution elements that all need to be executed\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolver *solv;\fR                           /* read only */
\fI$solution\fR\fB\->{solv}\fR
\fIsolution\fR\fB\&.solv\fR
\fIsolution\fR\fB\&.solv\fR
.fi
.if n \{\
.RE
.\}
.sp
Back pointer to solver object\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId problemid;\fR                           /* read only */
\fI$solution\fR\fB\->{problemid}\fR
\fIsolution\fR\fB\&.problemid\fR
\fIsolution\fR\fB\&.problemid\fR
.fi
.if n \{\
.RE
.\}
.sp
Id of the problem the solution solves\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId id;\fR                                  /* read only */
\fI$solution\fR\fB\->{id}\fR
\fIsolution\fR\fB\&.id\fR
\fIsolution\fR\fB\&.id\fR
.fi
.if n \{\
.RE
.\}
.sp
Id of the solution\&. The first solution has Id 1, they are numbered consecutively\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolutionelement *elements(bool\fR \fIexpandreplaces\fR \fB= 0)\fR
my \fI@solutionelements\fR \fB=\fR \fI$solution\fR\fB\->elements()\fR;
\fIsolutionelements\fR \fB=\fR \fIsolution\fR\fB\&.elements()\fR
\fIsolutionelements\fR \fB=\fR \fIsolution\fR\fB\&.elements()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return an array containing the elements describing what needs to be done to implement the specific solution\&. If expandreplaces is true, elements of type SOLVER_SOLUTION_REPLACE will be replaced by one or more elements replace elements describing the policy mismatches\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint element_count()\fR
my \fI$cnt\fR \fB=\fR \fI$solution\fR\fB\->solution_count()\fR;
\fIcnt\fR \fB=\fR \fIsolution\fR\fB\&.element_count()\fR
\fIcnt\fR \fB=\fR \fIsolution\fR\fB\&.element_count()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the number of solution elements without creating objects\&. Note that the count does not match the number of objects returned by the elements() method of expandreplaces is set to true\&.
.SH "THE SOLUTIONELEMENT CLASS"
.sp
A solution element describes a single action of a solution\&. The action is always either to remove one specific job or to add a new job that installs or erases a single specific package\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolver *solv;\fR                           /* read only */
\fI$solutionelement\fR\fB\->{solv}\fR
\fIsolutionelement\fR\fB\&.solv\fR
\fIsolutionelement\fR\fB\&.solv\fR
.fi
.if n \{\
.RE
.\}
.sp
Back pointer to solver object\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId problemid;\fR                           /* read only */
\fI$solutionelement\fR\fB\->{problemid}\fR
\fIsolutionelement\fR\fB\&.problemid\fR
\fIsolutionelement\fR\fB\&.problemid\fR
.fi
.if n \{\
.RE
.\}
.sp
Id of the problem the element (partly) solves\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId solutionid;\fR                          /* read only */
\fI$solutionelement\fR\fB\->{solutionid}\fR
\fIsolutionelement\fR\fB\&.solutionid\fR
\fIsolutionelement\fR\fB\&.solutionid\fR
.fi
.if n \{\
.RE
.\}
.sp
Id of the solution the element is a part of\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId id;\fR                                  /* read only */
\fI$solutionelement\fR\fB\->{id}\fR
\fIsolutionelement\fR\fB\&.id\fR
\fIsolutionelement\fR\fB\&.id\fR
.fi
.if n \{\
.RE
.\}
.sp
Id of the solution element\&. The first element has Id 1, they are numbered consecutively\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId type;\fR                                /* read only */
\fI$solutionelement\fR\fB\->{type}\fR
\fIsolutionelement\fR\fB\&.type\fR
\fIsolutionelement\fR\fB\&.type\fR
.fi
.if n \{\
.RE
.\}
.sp
Type of the solution element\&. See the constant section of the solver class for the existing types\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *solvable;\fR                     /* read only */
\fI$solutionelement\fR\fB\->{solvable}\fR
\fIsolutionelement\fR\fB\&.solvable\fR
\fIsolutionelement\fR\fB\&.solvable\fR
.fi
.if n \{\
.RE
.\}
.sp
The installed solvable that needs to be replaced for replacement elements\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *replacement;\fR                  /* read only */
\fI$solutionelement\fR\fB\->{replacement}\fR
\fIsolutionelement\fR\fB\&.replacement\fR
\fIsolutionelement\fR\fB\&.replacement\fR
.fi
.if n \{\
.RE
.\}
.sp
The solvable that needs to be installed to fix the problem\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint jobidx;\fR                             /* read only */
\fI$solutionelement\fR\fB\->{jobidx}\fR
\fIsolutionelement\fR\fB\&.jobidx\fR
\fIsolutionelement\fR\fB\&.jobidx\fR
.fi
.if n \{\
.RE
.\}
.sp
The index of the job that needs to be removed to fix the problem, or \-1 if the element is of another type\&. Note that it\(cqs better to change the job to SOLVER_NOOP type so that the numbering of other elements does not get disturbed\&. This method works both for types SOLVER_SOLUTION_JOB and SOLVER_SOLUTION_POOLJOB\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolutionelement *replaceelements()\fR
my \fI@solutionelements\fR \fB=\fR \fI$solutionelement\fR\fB\->replaceelements()\fR;
\fIsolutionelements\fR \fB=\fR \fIsolutionelement\fR\fB\&.replaceelements()\fR
\fIsolutionelements\fR \fB=\fR \fIsolutionelement\fR\fB\&.replaceelements()\fR
.fi
.if n \{\
.RE
.\}
.sp
If the solution element is of type SOLVER_SOLUTION_REPLACE, return an array of elements describing the policy mismatches, otherwise return a copy of the element\&. See also the \(lqexpandreplaces\(rq option in the solution\(cqs elements() method\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint illegalreplace()\fR
my \fI$illegal\fR \fB=\fR \fI$solutionelement\fR\fB\->illegalreplace()\fR;
\fIillegal\fR \fB=\fR \fIsolutionelement\fR\fB\&.illegalreplace()\fR
\fIillegal\fR \fB=\fR \fIsolutionelement\fR\fB\&.illegalreplace()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return an integer that contains the policy mismatch bits or\-ed together, or zero if there was no policy mismatch\&. See the policy error constants in the solver class\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBJob Job()\fR
my \fI$job\fR \fB=\fR \fI$solutionelement\fR\fB\->Job()\fR;
\fIillegal\fR \fB=\fR \fIsolutionelement\fR\fB\&.Job()\fR
\fIillegal\fR \fB=\fR \fIsolutionelement\fR\fB\&.Job()\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a job that implements the solution element\&. Add this job to the array of jobs for all elements of type different to SOLVER_SOLUTION_JOB and SOLVER_SOLUTION_POOLJOB\&. For the latter two, a SOLVER_NOOB Job is created, you should replace the old job with the new one\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *str()\fR
my \fI$str\fR \fB=\fR \fI$solutionelement\fR\fB\->str()\fR;
\fIstr\fR \fB=\fR \fIsolutionelement\fR\fB\&.str()\fR
\fIstr\fR \fB=\fR \fIsolutionelement\fR\fB\&.str()\fR
.fi
.if n \{\
.RE
.\}
.sp
A string describing the change the solution element consists of\&.
.SH "THE TRANSACTION CLASS"
.sp
Transactions describe the output of a solver run\&. A transaction contains a number of transaction elements, each either the installation of a new package or the removal of an already installed package\&. The Transaction class supports a classify() method that puts the elements into different groups so that a transaction can be presented to the user in a meaningful way\&.
.SS "CONSTANTS"
.sp
Transaction element types, both active and passive
.PP
\fBSOLVER_TRANSACTION_IGNORE\fR
.RS 4
This element does nothing\&. Used to map element types that do not match the view mode\&.
.RE
.PP
\fBSOLVER_TRANSACTION_INSTALL\fR
.RS 4
This element installs a package\&.
.RE
.PP
\fBSOLVER_TRANSACTION_ERASE\fR
.RS 4
This element erases a package\&.
.RE
.PP
\fBSOLVER_TRANSACTION_MULTIINSTALL\fR
.RS 4
This element installs a package with a different version keeping the other versions installed\&.
.RE
.PP
\fBSOLVER_TRANSACTION_MULTIREINSTALL\fR
.RS 4
This element reinstalls an installed package keeping the other versions installed\&.
.RE
.sp
Transaction element types, active view
.PP
\fBSOLVER_TRANSACTION_REINSTALL\fR
.RS 4
This element re\-installs a package, i\&.e\&. installs the same package again\&.
.RE
.PP
\fBSOLVER_TRANSACTION_CHANGE\fR
.RS 4
This element installs a package with same name, version, architecture but different content\&.
.RE
.PP
\fBSOLVER_TRANSACTION_UPGRADE\fR
.RS 4
This element installs a newer version of an installed package\&.
.RE
.PP
\fBSOLVER_TRANSACTION_DOWNGRADE\fR
.RS 4
This element installs an older version of an installed package\&.
.RE
.PP
\fBSOLVER_TRANSACTION_OBSOLETES\fR
.RS 4
This element installs a package that obsoletes an installed package\&.
.RE
.sp
Transaction element types, passive view
.PP
\fBSOLVER_TRANSACTION_REINSTALLED\fR
.RS 4
This element re\-installs a package, i\&.e\&. installs the same package again\&.
.RE
.PP
\fBSOLVER_TRANSACTION_CHANGED\fR
.RS 4
This element replaces an installed package with one of the same name, version, architecture but different content\&.
.RE
.PP
\fBSOLVER_TRANSACTION_UPGRADED\fR
.RS 4
This element replaces an installed package with a new version\&.
.RE
.PP
\fBSOLVER_TRANSACTION_DOWNGRADED\fR
.RS 4
This element replaces an installed package with an old version\&.
.RE
.PP
\fBSOLVER_TRANSACTION_OBSOLETED\fR
.RS 4
This element replaces an installed package with a package that obsoletes it\&.
.RE
.sp
Pseudo element types for showing extra information used by classify()
.PP
\fBSOLVER_TRANSACTION_ARCHCHANGE\fR
.RS 4
This element replaces an installed package with a package of a different architecture\&.
.RE
.PP
\fBSOLVER_TRANSACTION_VENDORCHANGE\fR
.RS 4
This element replaces an installed package with a package of a different vendor\&.
.RE
.sp
Transaction mode flags
.PP
\fBSOLVER_TRANSACTION_SHOW_ACTIVE\fR
.RS 4
Filter for active view types\&. The default is to return passive view type, i\&.e\&. to show how the installed packages get changed\&.
.RE
.PP
\fBSOLVER_TRANSACTION_SHOW_OBSOLETES\fR
.RS 4
Do not map the obsolete view type into INSTALL/ERASE elements\&.
.RE
.PP
\fBSOLVER_TRANSACTION_SHOW_ALL\fR
.RS 4
If multiple packages replace an installed package, only the best of them is kept as OBSOLETE element, the other ones are mapped to INSTALL/ERASE elements\&. This is because most applications want to show just one package replacing the installed one\&. The SOLVER_TRANSACTION_SHOW_ALL makes the library keep all OBSOLETE elements\&.
.RE
.PP
\fBSOLVER_TRANSACTION_SHOW_MULTIINSTALL\fR
.RS 4
The library maps MULTIINSTALL elements to simple INSTALL elements\&. This flag can be used to disable the mapping\&.
.RE
.PP
\fBSOLVER_TRANSACTION_CHANGE_IS_REINSTALL\fR
.RS 4
Use this flag if you want to map CHANGE elements to the REINSTALL type\&.
.RE
.PP
\fBSOLVER_TRANSACTION_OBSOLETE_IS_UPGRADE\fR
.RS 4
Use this flag if you want to map OBSOLETE elements to the UPGRADE type\&.
.RE
.PP
\fBSOLVER_TRANSACTION_MERGE_ARCHCHANGES\fR
.RS 4
Do not add extra categories for every architecture change, instead cumulate them in one category\&.
.RE
.PP
\fBSOLVER_TRANSACTION_MERGE_VENDORCHANGES\fR
.RS 4
Do not add extra categories for every vendor change, instead cumulate them in one category\&.
.RE
.PP
\fBSOLVER_TRANSACTION_RPM_ONLY\fR
.RS 4
Special view mode that just returns IGNORE, ERASE, INSTALL, MULTIINSTALL elements\&. Useful if you want to find out what to feed to the underlying package manager\&.
.RE
.sp
Transaction order flags
.PP
\fBSOLVER_TRANSACTION_KEEP_ORDERDATA\fR
.RS 4
Do not throw away the dependency graph used for ordering the transaction\&. This flag is needed if you want to do manual ordering\&.
.RE
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBPool *pool;\fR                             /* read only */
\fI$trans\fR\fB\->{pool}\fR
\fItrans\fR\fB\&.pool\fR
\fItrans\fR\fB\&.pool\fR
.fi
.if n \{\
.RE
.\}
.sp
Back pointer to pool\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool isempty()\fR;
\fI$trans\fR\fB\->isempty()\fR
\fItrans\fR\fB\&.isempty()\fR
\fItrans\fR\fB\&.isempty?\fR
.fi
.if n \{\
.RE
.\}
.sp
Returns true if the transaction does not do anything, i\&.e\&. has no elements\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *newsolvables()\fR;
my \fI@newsolvables\fR \fB=\fR \fI$trans\fR\fB\->newsolvables()\fR;
\fInewsolvables\fR \fB=\fR \fItrans\fR\fB\&.newsolvables()\fR
\fInewsolvables\fR \fB=\fR \fItrans\fR\fB\&.newsolvables()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return all packages that are to be installed by the transaction\&. These are the packages that need to be downloaded from the repositories\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *keptsolvables()\fR;
my \fI@keptsolvables\fR \fB=\fR \fI$trans\fR\fB\->keptsolvables()\fR;
\fIkeptsolvables\fR \fB=\fR \fItrans\fR\fB\&.keptsolvables()\fR
\fIkeptsolvables\fR \fB=\fR \fItrans\fR\fB\&.keptsolvables()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return all installed packages that the transaction will keep installed\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *steps()\fR;
my \fI@steps\fR \fB=\fR \fI$trans\fR\fB\->steps()\fR;
\fIsteps\fR \fB=\fR \fItrans\fR\fB\&.steps()\fR
\fIsteps\fR \fB=\fR \fItrans\fR\fB\&.steps()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return all solvables that need to be installed (if the returned solvable is not already installed) or erased (if the returned solvable is installed)\&. A step is also called a transaction element\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint steptype(Solvable *\fR\fIsolvable\fR\fB, int\fR \fImode\fR\fB)\fR
my \fI$type\fR \fB=\fR \fI$trans\fR\fB\->steptype(\fR\fI$solvable\fR\fB,\fR \fI$mode\fR\fB)\fR;
\fItype\fR \fB=\fR \fItrans\fR\fB\&.steptype(\fR\fIsolvable\fR\fB,\fR \fImode\fR\fB)\fR
\fItype\fR \fB=\fR \fItrans\fR\fB\&.steptype(\fR\fIsolvable\fR\fB,\fR \fImode\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the transaction type of the specified solvable\&. See the CONSTANTS sections for the mode argument flags and the list of returned types\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBTransactionClass *classify(int\fR \fImode\fR \fB= 0)\fR
my \fI@classes\fR \fB=\fR \fI$trans\fR\fB\->classify()\fR;
\fIclasses\fR \fB=\fR \fItrans\fR\fB\&.classify()\fR
\fIclasses\fR \fB=\fR \fItrans\fR\fB\&.classify()\fR
.fi
.if n \{\
.RE
.\}
.sp
Group the transaction elements into classes so that they can be displayed in a structured way\&. You can use various mapping mode flags to tweak the result to match your preferences, see the mode argument flag in the CONSTANTS section\&. See the TransactionClass class for how to deal with the returned objects\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable othersolvable(Solvable *\fR\fIsolvable\fR\fB)\fR;
my \fI$other\fR \fB=\fR \fI$trans\fR\fB\->othersolvable(\fR\fI$solvable\fR\fB)\fR;
\fIother\fR \fB=\fR \fItrans\fR\fB\&.othersolvable(\fR\fIsolvable\fR\fB)\fR
\fIother\fR \fB=\fR \fItrans\fR\fB\&.othersolvable(\fR\fIsolvable\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the \(lqother\(rq solvable for a given solvable\&. For installed packages the other solvable is the best package with the same name that replaces the installed package, or the best package of the obsoleting packages if the package does not get replaced by one with the same name\&.
.sp
For to be installed packages, the \(lqother\(rq solvable is the best installed package with the same name that will be replaced, or the best packages of all the packages that are obsoleted if the new package does not replace a package with the same name\&.
.sp
Thus, the \(lqother\(rq solvable is normally the package that is also shown for a given package\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSolvable *allothersolvables(Solvable *\fR\fIsolvable\fR\fB)\fR;
my \fI@others\fR \fB=\fR \fI$trans\fR\fB\->allothersolvables(\fR\fI$solvable\fR\fB)\fR;
\fIothers\fR \fB=\fR \fItrans\fR\fB\&.allothersolvables(\fR\fIsolvable\fR\fB)\fR
\fIothers\fR \fB=\fR \fItrans\fR\fB\&.allothersolvables(\fR\fIsolvable\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
For installed packages, returns all of the packages that replace us\&. For to be installed packages, returns all of the packages that the new package replaces\&. The special \(lqother\(rq solvable is always the first entry of the returned array\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBlong long calc_installsizechange()\fR;
my \fI$change\fR \fB=\fR \fI$trans\fR\fB\->calc_installsizechange()\fR;
\fIchange\fR \fB=\fR \fItrans\fR\fB\&.calc_installsizechange()\fR
\fIchange\fR \fB=\fR \fItrans\fR\fB\&.calc_installsizechange()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the size change of the installed system in kilobytes (kibibytes)\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid order(int\fR \fIflags\fR \fB= 0)\fR;
\fI$trans\fR\fB\->order()\fR;
\fItrans\fR\fB\&.order()\fR
\fItrans\fR\fB\&.order()\fR
.fi
.if n \{\
.RE
.\}
.sp
Order the steps in the transactions so that dependent packages are updated before packages that depend on them\&. For rpm, you can also use rpmlib\(cqs ordering functionality, debian\(cqs dpkg does not provide a way to order a transaction\&.
.SS "ACTIVE/PASSIVE VIEW"
.sp
Active view lists what new packages get installed, while passive view shows what happens to the installed packages\&. Most often there\(cqs not much difference between the two modes, but things get interesting if multiple packages get replaced by one new package\&. Say you have installed packages A\-1\-1 and B\-1\-1, and now install A\-2\-1 which has a new dependency that obsoletes B\&. The transaction elements will be
.sp
.if n \{\
.RS 4
.\}
.nf
updated   A\-1\-1 (other: A\-2\-1)
obsoleted B\-1\-1 (other: A\-2\-1)
.fi
.if n \{\
.RE
.\}
.sp
in passive mode, but
.sp
.if n \{\
.RS 4
.\}
.nf
update A\-2\-1 (other: A\-1\-1)
erase  B
.fi
.if n \{\
.RE
.\}
.sp
in active mode\&. If the mode contains SOLVER_TRANSACTION_SHOW_ALL, the passive mode list will be unchanged but the active mode list will just contain A\-2\-1\&.
.SH "THE TRANSACTIONCLASS CLASS"
.sp
Objects of this type are returned by the classify() Transaction method\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBTransaction *transaction;\fR               /* read only */
\fI$class\fR\fB\->{transaction}\fR
\fIclass\fR\fB\&.transaction\fR
\fIclass\fR\fB\&.transaction\fR
.fi
.if n \{\
.RE
.\}
.sp
Back pointer to transaction object\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint type;\fR                               /* read only */
\fI$class\fR\fB\->{type}\fR
\fIclass\fR\fB\&.type\fR
\fIclass\fR\fB\&.type\fR
.fi
.if n \{\
.RE
.\}
.sp
The type of the transaction elements in the class\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint count;\fR                              /* read only */
\fI$class\fR\fB\->{count}\fR
\fIclass\fR\fB\&.count\fR
\fIclass\fR\fB\&.count\fR
.fi
.if n \{\
.RE
.\}
.sp
The number of elements in the class\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *\fR\fIfromstr\fR;
\fI$class\fR\fB\->{fromstr}\fR
\fIclass\fR\fB\&.fromstr\fR
\fIclass\fR\fB\&.fromstr\fR
.fi
.if n \{\
.RE
.\}
.sp
The old vendor or architecture\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *\fR\fItostr\fR;
\fI$class\fR\fB\->{tostr}\fR
\fIclass\fR\fB\&.tostr\fR
\fIclass\fR\fB\&.tostr\fR
.fi
.if n \{\
.RE
.\}
.sp
The new vendor or architecture\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId\fR \fIfromid\fR;
\fI$class\fR\fB\->{fromid}\fR
\fIclass\fR\fB\&.fromid\fR
\fIclass\fR\fB\&.fromid\fR
.fi
.if n \{\
.RE
.\}
.sp
The id of the old vendor or architecture\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId\fR \fItoid\fR;
\fI$class\fR\fB\->{toid}\fR
\fIclass\fR\fB\&.toid\fR
\fIclass\fR\fB\&.toid\fR
.fi
.if n \{\
.RE
.\}
.sp
The id of the new vendor or architecture\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid solvables()\fR;
my \fI@solvables\fR \fB=\fR \fI$class\fR\fB\->solvables()\fR;
\fIsolvables\fR \fB=\fR \fIclass\fR\fB\&.solvables()\fR
\fIsolvables\fR \fB=\fR \fIclass\fR\fB\&.solvables()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the solvables for all transaction elements in the class\&.
.SH "CHECKSUMS"
.sp
Checksums (also called hashes) are used to make sure that downloaded data is not corrupt and also as a fingerprint mechanism to check if data has changed\&.
.SS "CLASS METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBChksum Chksum(Id\fR \fItype\fR\fB)\fR
my \fI$chksum\fR \fB= solv::Chksum\->new(\fR\fI$type\fR\fB)\fR;
\fIchksum\fR \fB= solv\&.Chksum(\fR\fItype\fR\fB)\fR
\fIchksum\fR \fB= Solv::Chksum\&.new(\fR\fItype\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a checksum object\&. Currently the following types are supported:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBREPOKEY_TYPE_MD5\fR
\fBREPOKEY_TYPE_SHA1\fR
\fBREPOKEY_TYPE_SHA256\fR
.fi
.if n \{\
.RE
.\}
.sp
These keys are constants in the \fBsolv\fR class\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBChksum Chksum(Id\fR \fItype\fR\fB, const char *\fR\fIhex\fR\fB)\fR
my \fI$chksum\fR \fB= solv::Chksum\->new(\fR\fI$type\fR\fB,\fR \fI$hex\fR\fB)\fR;
\fIchksum\fR \fB= solv\&.Chksum(\fR\fItype\fR\fB,\fR \fIhex\fR\fB)\fR
\fIchksum\fR \fB= Solv::Chksum\&.new(\fR\fItype\fR\fB,\fR \fIhex\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create an already finalized checksum object from a hex string\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBChksum Chksum_from_bin(Id\fR \fItype\fR\fB, char *\fR\fIbin\fR\fB)\fR
my \fI$chksum\fR \fB= solv::Chksum\->from_bin(\fR\fI$type\fR\fB,\fR \fI$bin\fR\fB)\fR;
\fIchksum\fR \fB= solv\&.Chksum\&.from_bin(\fR\fItype\fR\fB,\fR \fIbin\fR\fB)\fR
\fIchksum\fR \fB= Solv::Chksum\&.from_bin(\fR\fItype\fR\fB,\fR \fIbin\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create an already finalized checksum object from a binary checksum\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId type;\fR                        /* read only */
\fI$chksum\fR\fB\->{type}\fR
\fIchksum\fR\fB\&.type\fR
\fIchksum\fR\fB\&.type\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the type of the checksum object\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid add(const char *\fR\fIstr\fR\fB)\fR
\fI$chksum\fR\fB\->add(\fR\fI$str\fR\fB)\fR;
\fIchksum\fR\fB\&.add(\fR\fIstr\fR\fB)\fR
\fIchksum\fR\fB\&.add(\fR\fIstr\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add a (binary) string to the checksum\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid add_fp(FILE *\fR\fIfp\fR\fB)\fR
\fI$chksum\fR\fB\->add_fp(\fR\fI$file\fR\fB)\fR;
\fIchksum\fR\fB\&.add_fp(\fR\fIfile\fR\fB)\fR
\fIchksum\fR\fB\&.add_fp(\fR\fIfile\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add the contents of a file to the checksum\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid add_stat(const char *\fR\fIfilename\fR\fB)\fR
\fI$chksum\fR\fB\->add_stat(\fR\fI$filename\fR\fB)\fR;
\fIchksum\fR\fB\&.add_stat(\fR\fIfilename\fR\fB)\fR
\fIchksum\fR\fB\&.add_stat(\fR\fIfilename\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Stat the file and add the dev/ino/size/mtime member to the checksum\&. If the stat fails, the members are zeroed\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid add_fstat(int\fR \fIfd\fR\fB)\fR
\fI$chksum\fR\fB\->add_fstat(\fR\fI$fd\fR\fB)\fR;
\fIchksum\fR\fB\&.add_fstat(\fR\fIfd\fR\fB)\fR
\fIchksum\fR\fB\&.add_fstat(\fR\fIfd\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Same as add_stat, but instead of the filename a file descriptor is used\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBunsigned char *raw()\fR
my \fI$raw\fR \fB=\fR \fI$chksum\fR\fB\->raw()\fR;
\fIraw\fR \fB=\fR \fIchksum\fR\fB\&.raw()\fR
\fIraw\fR \fB=\fR \fIchksum\fR\fB\&.raw()\fR
.fi
.if n \{\
.RE
.\}
.sp
Finalize the checksum and return the result as raw bytes\&. This means that the result can contain NUL bytes or unprintable characters\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *hex()\fR
my \fI$raw\fR \fB=\fR \fI$chksum\fR\fB\->hex()\fR;
\fIraw\fR \fB=\fR \fIchksum\fR\fB\&.hex()\fR
\fIraw\fR \fB=\fR \fIchksum\fR\fB\&.hex()\fR
.fi
.if n \{\
.RE
.\}
.sp
Finalize the checksum and return the result as hex string\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *typestr()\fR
my \fI$typestr\fR \fB=\fR \fI$chksum\fR\fB\->typestr()\fR;
\fItypestr\fR \fB=\fR \fIchksum\fR\fB\&.typestr\fR
\fItypestr\fR \fB=\fR \fIchksum\fR\fB\&.typestr\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the type of the checksum as a string, e\&.g\&. "sha256"\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<equality>\fR
\fBif (\fR\fI$chksum1\fR \fB==\fR \fI$chksum2\fR\fB)\fR
\fBif\fR \fIchksum1\fR \fB==\fR \fIchksum2\fR\fB:\fR
\fBif\fR \fIchksum1\fR \fB==\fR \fIchksum2\fR
.fi
.if n \{\
.RE
.\}
.sp
Checksums are equal if they are of the same type and the finalized results are the same\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<stringification>\fR
my \fI$str\fR \fB=\fR \fI$chksum\fR\fB\->str\fR;
\fIstr\fR \fB= str(\fR\fIchksum\fR\fB)\fR
\fIstr\fR \fB=\fR \fIchksum\fR\fB\&.to_s\fR
.fi
.if n \{\
.RE
.\}
.sp
If the checksum is finished, the checksum is returned as "<type>:<hex>" string\&. Otherwise "<type>:unfinished" is returned\&.
.SH "FILE MANAGEMENT"
.sp
This functions were added because libsolv uses standard \fBFILE\fR pointers to read/write files, but languages like perl have their own implementation of files\&. The libsolv functions also support decompression and compression, the algorithm is selected by looking at the file name extension\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBFILE *xfopen(char *\fR\fIfn\fR\fB, char *\fR\fImode\fR \fB= "r")\fR
my \fI$file\fR \fB= solv::xfopen(\fR\fI$path\fR\fB)\fR;
\fIfile\fR \fB= solv\&.xfopen(\fR\fIpath\fR\fB)\fR
\fIfile\fR \fB= Solv::xfopen(\fR\fIpath\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Open a file at the specified path\&. The mode argument is passed on to the stdio library\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBFILE *xfopen_fd(char *\fR\fIfn\fR\fB, int\fR \fIfileno\fR\fB)\fR
my \fI$file\fR \fB= solv::xfopen_fd(\fR\fI$path\fR\fB,\fR \fI$fileno\fR\fB)\fR;
\fIfile\fR \fB= solv\&.xfopen_fd(\fR\fIpath\fR\fB,\fR \fIfileno\fR\fB)\fR
\fIfile\fR \fB= Solv::xfopen_fd(\fR\fIpath\fR\fB,\fR \fIfileno\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a file handle from the specified file descriptor\&. The path argument is only used to select the correct (de\-)compression algorithm, use an empty path if you want to make sure to read/write raw data\&. The file descriptor is dup()ed before the file handle is created\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint fileno()\fR
my \fI$fileno\fR \fB=\fR \fI$file\fR\fB\->fileno()\fR;
\fIfileno\fR \fB=\fR \fIfile\fR\fB\&.fileno()\fR
\fIfileno\fR \fB=\fR \fIfile\fR\fB\&.fileno()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return file file descriptor of the file\&. If the file is not open, \-1 is returned\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid cloexec(bool\fR \fIstate\fR\fB)\fR
\fI$file\fR\fB\->cloexec(\fR\fI$state\fR\fB)\fR
\fIfile\fR\fB\&.cloexec(\fR\fIstate\fR\fB)\fR
\fIfile\fR\fB\&.cloexec(\fR\fIstate\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Set the close\-on\-exec flag of the file descriptor\&. The xfopen function returns files with close\-on\-exec turned on, so if you want to pass a file to some other process you need to call cloexec(0) before calling exec\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint dup()\fR
my \fI$fileno\fR \fB=\fR \fI$file\fR\fB\->dup()\fR;
\fIfileno\fR \fB=\fR \fIfile\fR\fB\&.dup()\fR
\fIfileno\fR \fB=\fR \fIfile\fR\fB\&.dup()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return a copy of the descriptor of the file\&. If the file is not open, \-1 is returned\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool flush()\fR
\fI$file\fR\fB\->flush()\fR;
\fIfile\fR\fB\&.flush()\fR
\fIfile\fR\fB\&.flush()\fR
.fi
.if n \{\
.RE
.\}
.sp
Flush the file\&. Returns false if there was an error\&. Flushing a closed file always returns true\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool close()\fR
\fI$file\fR\fB\->close()\fR;
\fIfile\fR\fB\&.close()\fR
\fIfile\fR\fB\&.close()\fR
.fi
.if n \{\
.RE
.\}
.sp
Close the file\&. This is needed for languages like Ruby that do not destruct objects right after they are no longer referenced\&. In that case, it is good style to close open files so that the file descriptors are freed right away\&. Returns false if there was an error\&.
.SH "THE REPODATA CLASS"
.sp
The Repodata stores attributes for packages and the repository itself, each repository can have multiple repodata areas\&. You normally only need to directly access them if you implement lazy downloading of repository data\&. Repodata areas are created by calling the repository\(cqs add_repodata() method or by using repo_add methods without the REPO_REUSE_REPODATA or REPO_USE_LOADING flag\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRepo *repo;\fR                     /* read only */
\fI$data\fR\fB\->{repo}\fR
\fIdata\fR\fB\&.repo\fR
\fIdata\fR\fB\&.repo\fR
.fi
.if n \{\
.RE
.\}
.sp
Back pointer to repository object\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId id;\fR                                  /* read only */
\fI$data\fR\fB\->{id}\fR
\fIdata\fR\fB\&.id\fR
\fIdata\fR\fB\&.id\fR
.fi
.if n \{\
.RE
.\}
.sp
The id of the repodata area\&. Repodata ids of different repositories overlap\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBinternalize()\fR;
\fI$data\fR\fB\->internalize()\fR;
\fIdata\fR\fB\&.internalize()\fR
\fIdata\fR\fB\&.internalize()\fR
.fi
.if n \{\
.RE
.\}
.sp
Internalize newly added data\&. The lookup functions will only see the new data after it has been internalized\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool write(FILE *\fR\fIfp\fR\fB)\fR;
\fI$data\fR\fB\->write(\fR\fI$fp\fR\fB)\fR;
\fIdata\fR\fB\&.write(\fR\fIfp\fR\fB)\fR
\fIdata\fR\fB\&.write(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Write the contents of the repodata area as solv file\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId str2dir(const char *\fR\fIdir\fR\fB, bool\fR \fIcreate\fR \fB= 1)\fR
my \fI$did\fR \fB=\fR \fIdata\fR\fB\->str2dir(\fR\fI$dir\fR\fB)\fR;
\fIdid\fR \fB=\fR \fIdata\fR\fB\&.str2dir(\fR\fIdir\fR\fB)\fR
\fIdid\fR \fB=\fR \fIdata\fR\fB\&.str2dir(\fR\fIdir\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *dir2str(Id\fR \fIdid\fR\fB, const char *\fR\fIsuffix\fR \fB= 0)\fR
\fI$dir\fR \fB=\fR \fIpool\fR\fB\->dir2str(\fR\fI$did\fR\fB)\fR;
\fIdir\fR \fB=\fR \fIpool\fR\fB\&.dir2str(\fR\fIdid\fR\fB)\fR
\fIdir\fR \fB=\fR \fIpool\fR\fB\&.dir2str(\fR\fIdid\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Convert a string (directory) into an Id and back\&. If the string is currently not in the pool and \fIcreate\fR is false, zero is returned\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid add_dirstr(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fIdir\fR\fB, const char *\fR\fIstr\fR\fB)\fR
\fI$data\fR\fB\->add_dirstr(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$dir\fR\fB,\fR \fI$string\fR\fB)\fR
\fIdata\fR\fB\&.add_dirstr(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIdir\fR\fB,\fR \fIstring\fR\fB)\fR
\fIdata\fR\fB\&.add_dirstr(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIdir\fR\fB,\fR \fIstring\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Add a file path consisting of a dirname Id and a basename string\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_solv(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR;
\fI$data\fR\fB\->add_solv(\fR\fI$fp\fR\fB)\fR;
\fIdata\fR\fB\&.add_solv(\fR\fIfp\fR\fB)\fR
\fIdata\fR\fB\&.add_solv(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Replace a stub repodata object with the data from a solv file\&. This method automatically adds the REPO_USE_LOADING flag\&. It should only be used from a load callback\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid create_stubs()\fR;
\fI$data\fR\fB\->create_stubs()\fR
\fIdata\fR\fB\&.create_stubs()\fR
\fIdata\fR\fB\&.create_stubs()\fR
.fi
.if n \{\
.RE
.\}
.sp
Create stub repodatas from the information stored in the repodata meta area\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid extend_to_repo()\fR;
\fI$data\fR\fB\->extend_to_repo()\fR;
\fIdata\fR\fB\&.extend_to_repo()\fR
\fIdata\fR\fB\&.extend_to_repo()\fR
.fi
.if n \{\
.RE
.\}
.sp
Extend the repodata so that it has the same size as the repo it belongs to\&. This method is needed when setting up a new extension repodata so that it matches the repository size\&. It is also needed when switching to a just written repodata extension to make the repodata match the written extension (which is always of the size of the repo)\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB<equality>\fR
\fBif (\fR\fI$data1\fR \fB==\fR \fI$data2\fR\fB)\fR
\fBif\fR \fIdata1\fR \fB==\fR \fIdata2\fR\fB:\fR
\fBif\fR \fIdata1\fR \fB==\fR \fIdata2\fR
.fi
.if n \{\
.RE
.\}
.sp
Two repodata objects are equal if they belong to the same repository and have the same id\&.
.SS "DATA RETRIEVAL METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *lookup_str(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR
my \fI$string\fR \fB=\fR \fI$data\fR\fB\->lookup_str(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIstring\fR \fB=\fR \fIdata\fR\fB\&.lookup_str(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIstring\fR \fB=\fR \fIdata\fR\fB\&.lookup_str(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *lookup_id(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR
my \fI$string\fR \fB=\fR \fI$data\fR\fB\->lookup_id(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIstring\fR \fB=\fR \fIdata\fR\fB\&.lookup_id(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIstring\fR \fB=\fR \fIdata\fR\fB\&.lookup_id(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBunsigned long long lookup_num(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, unsigned long long\fR \fInotfound\fR \fB= 0)\fR
my \fI$num\fR \fB=\fR \fI$data\fR\fB\->lookup_num(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fInum\fR \fB=\fR \fIdata\fR\fB\&.lookup_num(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fInum\fR \fB=\fR \fIdata\fR\fB\&.lookup_num(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool lookup_void(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR
my \fI$bool\fR \fB=\fR \fI$data\fR\fB\->lookup_void(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIbool\fR \fB=\fR \fIdata\fR\fB\&.lookup_void(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIbool\fR \fB=\fR \fIdata\fR\fB\&.lookup_void(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId *lookup_idarray(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR
my \fI@ids\fR \fB=\fR \fI$data\fR\fB\->lookup_idarray(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIids\fR \fB=\fR \fIdata\fR\fB\&.lookup_idarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIids\fR \fB=\fR \fIdata\fR\fB\&.lookup_idarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBChksum lookup_checksum(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR
my \fI$chksum\fR \fB=\fR \fI$data\fR\fB\->lookup_checksum(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIchksum\fR \fB=\fR \fIdata\fR\fB\&.lookup_checksum(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIchksum\fR \fB=\fR \fIdata\fR\fB\&.lookup_checksum(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Lookup functions\&. Return the data element stored in the specified solvable\&. The methods probably only make sense to retrieve data from the special SOLVID_META solvid that stores repodata meta information\&.
.SS "DATA STORAGE METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid set_str(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, const char *\fR\fIstr\fR\fB)\fR;
\fI$data\fR\fB\->set_str(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$str\fR\fB)\fR;
\fIdata\fR\fB\&.set_str(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIstr\fR\fB)\fR
\fIdata\fR\fB\&.set_str(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIstr\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid set_id(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, DepId\fR \fIid\fR\fB)\fR;
\fI$data\fR\fB\->set_id(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$id\fR\fB)\fR;
\fIdata\fR\fB\&.set_id(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIid\fR\fB)\fR
\fIdata\fR\fB\&.set_id(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIid\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid set_num(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, unsigned long long\fR \fInum\fR\fB)\fR;
\fI$data\fR\fB\->set_num(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$num\fR\fB)\fR;
\fIdata\fR\fB\&.set_num(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fInum\fR\fB)\fR
\fIdata\fR\fB\&.set_num(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fInum\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid set_void(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR;
\fI$data\fR\fB\->set_void(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIdata\fR\fB\&.set_void(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIdata\fR\fB\&.set_void(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid set_poolstr(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, const char *\fR\fIstr\fR\fB)\fR;
\fI$data\fR\fB\->set_poolstr(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$str\fR\fB)\fR;
\fIdata\fR\fB\&.set_poolstr(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIstr\fR\fB)\fR
\fIdata\fR\fB\&.set_poolstr(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIstr\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid set_checksum(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, Chksum *\fR\fIchksum\fR\fB)\fR;
\fI$data\fR\fB\->set_checksum(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$chksum\fR\fB)\fR;
\fIdata\fR\fB\&.set_checksum(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIchksum\fR\fB)\fR
\fIdata\fR\fB\&.set_checksum(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIchksum\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid set_sourcepkg(Id\fR \fIsolvid\fR\fB, const char *\fR\fIsourcepkg\fR\fB)\fR;
\fI$data\fR\fB\&.set_sourcepkg(\fR\fI$solvid\fR\fB,\fR \fI$sourcepkg\fR\fB)\fR;
\fIdata\fR\fB\&.set_sourcepkg(\fR\fIsolvid\fR\fB,\fR \fIsourcepkg\fR\fB)\fR
\fIdata\fR\fB\&.set_sourcepkg(\fR\fIsolvid\fR\fB,\fR \fIsourcepkg\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid set_location(Id\fR \fIsolvid\fR\fB, unsigned int\fR \fImediano\fR\fB, const char *\fR\fIlocation\fR\fB)\fR;
\fI$data\fR\fB\&.set_location(\fR\fI$solvid\fR\fB,\fR \fI$mediano\fR\fB,\fR \fI$location\fR\fB)\fR;
\fIdata\fR\fB\&.set_location(\fR\fIsolvid\fR\fB,\fR \fImediano\fR\fB,\fR \fIlocation\fR\fB)\fR
\fIdata\fR\fB\&.set_location(\fR\fIsolvid\fR\fB,\fR \fImediano\fR\fB,\fR \fIlocation\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid add_idarray(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, DepId\fR \fIid\fR\fB)\fR;
\fI$data\fR\fB\->add_idarray(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$id\fR\fB)\fR;
\fIdata\fR\fB\&.add_idarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIid\fR\fB)\fR
\fIdata\fR\fB\&.add_idarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIid\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId new_handle()\fR;
my \fI$handle\fR \fB=\fR \fI$data\fR\fB\->new_handle()\fR;
\fIhandle\fR \fB=\fR \fIdata\fR\fB\&.new_handle()\fR
\fIhandle\fR \fB=\fR \fIdata\fR\fB\&.new_handle()\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid add_flexarray(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fIhandle\fR\fB)\fR;
\fI$data\fR\fB\->add_flexarray(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$handle\fR\fB)\fR;
\fIdata\fR\fB\&.add_flexarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIhandle\fR\fB)\fR
\fIdata\fR\fB\&.add_flexarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIhandle\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid unset(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR;
\fI$data\fR\fB\->unset(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR;
\fIdata\fR\fB\&.unset(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
\fIdata\fR\fB\&.unset(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Data storage methods\&. Probably only useful to store data in the special SOLVID_META solvid that stores repodata meta information\&. Note that repodata areas can have their own Id pool (see the REPO_LOCALPOOL flag), so be careful if you need to store ids\&. Arrays are created by calling the add function for every element\&. A flexarray is an array of sub\-structures, call new_handle to create a new structure, use the handle as solvid to fill the structure with data and call add_flexarray to put the structure in an array\&.
.SH "THE DATAPOS CLASS"
.sp
Datapos objects describe a specific position in the repository data area\&. Thus they are only valid until the repository is modified in some way\&. Datapos objects can be created by the pos() and parentpos() methods of a Datamatch object or by accessing the \(lqmeta\(rq attribute of a repository\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBRepo *repo;\fR                     /* read only */
\fI$data\fR\fB\->{repo}\fR
\fIdata\fR\fB\&.repo\fR
\fIdata\fR\fB\&.repo\fR
.fi
.if n \{\
.RE
.\}
.sp
Back pointer to repository object\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDataiterator(Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR\fB, int\fR \fIflags\fR\fB)\fR
my \fI$di\fR \fB=\fR \fI$datapos\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
\fIdi\fR \fB=\fR \fIdatapos\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
\fIdi\fR \fB=\fR \fIdatapos\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Create a Dataiterator at the position of the datapos object\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *lookup_deltalocation(unsigned int *\fR\fIOUTPUT\fR\fB)\fR;
my \fB(\fR\fI$location\fR\fB,\fR \fI$mediano\fR\fB) =\fR \fI$datapos\fR\fB\->lookup_deltalocation()\fR;
\fIlocation\fR\fB,\fR \fImediano\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_deltalocation()\fR
\fIlocation\fR\fB,\fR \fImediano\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_deltalocation()\fR
.fi
.if n \{\
.RE
.\}
.sp
Return a tuple containing the on\-media location and an optional media number for a delta rpm\&. This obviously only works if the data position points to structure describing a delta rpm\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *lookup_deltaseq()\fR;
my \fI$seq\fR \fB=\fR \fI$datapos\fR\fB\->lookup_deltaseq()\fR;
\fIseq\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_deltaseq()\fR;
\fIseq\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_deltaseq()\fR;
.fi
.if n \{\
.RE
.\}
.sp
Return the delta rpm sequence from the structure describing a delta rpm\&.
.SS "DATA RETRIEVAL METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBconst char *lookup_str(Id\fR \fIkeyname\fR\fB)\fR
my \fI$string\fR \fB=\fR \fI$datapos\fR\fB\->lookup_str(\fR\fI$keyname\fR\fB)\fR;
\fIstring\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_str(\fR\fIkeyname\fR\fB)\fR
\fIstring\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_str(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId lookup_id(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR
my \fI$id\fR \fB=\fR \fI$datapos\fR\fB\->lookup_id(\fR\fI$keyname\fR\fB)\fR;
\fIid\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_id(\fR\fIkeyname\fR\fB)\fR
\fIid\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_id(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBunsigned long long lookup_num(Id\fR \fIkeyname\fR\fB, unsigned long long\fR \fInotfound\fR \fB= 0)\fR
my \fI$num\fR \fB=\fR \fI$datapos\fR\fB\->lookup_num(\fR\fI$keyname\fR\fB)\fR;
\fInum\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_num(\fR\fIkeyname\fR\fB)\fR
\fInum\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_num(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool lookup_void(Id\fR \fIkeyname\fR\fB)\fR
my \fI$bool\fR \fB=\fR \fI$datapos\fR\fB\->lookup_void(\fR\fI$keyname\fR\fB)\fR;
\fIbool\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_void(\fR\fIkeyname\fR\fB)\fR
\fIbool\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_void(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBId *lookup_idarray(Id\fR \fIkeyname\fR\fB)\fR
my \fI@ids\fR \fB=\fR \fI$datapos\fR\fB\->lookup_idarray(\fR\fI$keyname\fR\fB)\fR;
\fIids\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_idarray(\fR\fIkeyname\fR\fB)\fR
\fIids\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_idarray(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBChksum lookup_checksum(Id\fR \fIkeyname\fR\fB)\fR
my \fI$chksum\fR \fB=\fR \fI$datapos\fR\fB\->lookup_checksum(\fR\fI$keyname\fR\fB)\fR;
\fIchksum\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_checksum(\fR\fIkeyname\fR\fB)\fR
\fIchksum\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_checksum(\fR\fIkeyname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Lookup functions\&. Note that the returned Ids are always translated into the Ids of the global pool even if the repodata area contains its own pool\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBDataiterator Dataiterator(Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR
my \fI$di\fR \fB=\fR \fI$datapos\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
\fIdi\fR \fB=\fR \fIdatapos\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
\fIdi\fR \fB=\fR \fIdatapos\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBfor my\fR \fI$d\fR \fB(\fR\fI@$di\fR\fB)\fR
\fBfor\fR \fId\fR \fBin\fR \fIdi\fR\fB:\fR
\fBfor\fR \fId\fR \fBin\fR \fIdi\fR
.fi
.if n \{\
.RE
.\}
.sp
Iterate over the matching data elements\&. See the Dataiterator class for more information\&.
.SH "AUTHOR"
.sp
Michael Schroeder <mls@suse\&.de>