Imported Upstream version 0.6.23
[platform/upstream/libsolv.git] / src / suse.c
1 /*
2  * Copyright (c) 2016, SUSE LLC.
3  *
4  * This program is licensed under the BSD license, read LICENSE.BSD
5  * for further information
6  */
7
8 /* weird SUSE stuff. better not use it for your projects. */
9
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <unistd.h>
13 #include <string.h>
14
15 #include "solver.h"
16 #include "solver_private.h"
17 #include "bitmap.h"
18 #include "pool.h"
19 #include "poolvendor.h"
20 #include "util.h"
21
22 Offset
23 repo_fix_supplements(Repo *repo, Offset provides, Offset supplements, Offset freshens)
24 {
25   Pool *pool = repo->pool;
26   Id id, idp, idl;
27   char buf[1024], *p, *dep;
28   int i, l;
29
30   if (provides)
31     {
32       for (i = provides; repo->idarraydata[i]; i++)
33         {
34           id = repo->idarraydata[i];
35           if (ISRELDEP(id))
36             continue;
37           dep = (char *)pool_id2str(pool, id);
38           if (!strncmp(dep, "locale(", 7) && strlen(dep) < sizeof(buf) - 2)
39             {
40               idp = 0;
41               strcpy(buf + 2, dep);
42               dep = buf + 2 + 7;
43               if ((p = strchr(dep, ':')) != 0 && p != dep)
44                 {
45                   *p++ = 0;
46                   idp = pool_str2id(pool, dep, 1);
47                   dep = p;
48                 }
49               id = 0;
50               while ((p = strchr(dep, ';')) != 0)
51                 {
52                   if (p == dep)
53                     {
54                       dep = p + 1;
55                       continue;
56                     }
57                   *p++ = 0;
58                   idl = pool_str2id(pool, dep, 1);
59                   idl = pool_rel2id(pool, NAMESPACE_LANGUAGE, idl, REL_NAMESPACE, 1);
60                   if (id)
61                     id = pool_rel2id(pool, id, idl, REL_OR, 1);
62                   else
63                     id = idl;
64                   dep = p;
65                 }
66               if (dep[0] && dep[1])
67                 {
68                   for (p = dep; *p && *p != ')'; p++)
69                     ;
70                   *p = 0;
71                   idl = pool_str2id(pool, dep, 1);
72                   idl = pool_rel2id(pool, NAMESPACE_LANGUAGE, idl, REL_NAMESPACE, 1);
73                   if (id)
74                     id = pool_rel2id(pool, id, idl, REL_OR, 1);
75                   else
76                     id = idl;
77                 }
78               if (idp)
79                 id = pool_rel2id(pool, idp, id, REL_AND, 1);
80               if (id)
81                 supplements = repo_addid_dep(repo, supplements, id, 0);
82             }
83           else if ((p = strchr(dep, ':')) != 0 && p != dep && p[1] == '/' && strlen(dep) < sizeof(buf))
84             {
85               strcpy(buf, dep);
86               p = buf + (p - dep);
87               *p++ = 0;
88               idp = pool_str2id(pool, buf, 1);
89               /* strip trailing slashes */
90               l = strlen(p);
91               while (l > 1 && p[l - 1] == '/')
92                 p[--l] = 0;
93               id = pool_str2id(pool, p, 1);
94               id = pool_rel2id(pool, idp, id, REL_WITH, 1);
95               id = pool_rel2id(pool, NAMESPACE_SPLITPROVIDES, id, REL_NAMESPACE, 1);
96               supplements = repo_addid_dep(repo, supplements, id, 0);
97             }
98         }
99     }
100   if (supplements)
101     {
102       for (i = supplements; repo->idarraydata[i]; i++)
103         {
104           id = repo->idarraydata[i];
105           if (ISRELDEP(id))
106             continue;
107           dep = (char *)pool_id2str(pool, id);
108           if (!strncmp(dep, "system:modalias(", 16))
109             dep += 7;
110           if (!strncmp(dep, "modalias(", 9) && dep[9] && dep[10] && strlen(dep) < sizeof(buf))
111             {
112               strcpy(buf, dep);
113               p = strchr(buf + 9, ':');
114               if (p && p != buf + 9 && strchr(p + 1, ':'))
115                 {
116                   *p++ = 0;
117                   idp = pool_str2id(pool, buf + 9, 1);
118                   p[strlen(p) - 1] = 0;
119                   id = pool_str2id(pool, p, 1);
120                   id = pool_rel2id(pool, NAMESPACE_MODALIAS, id, REL_NAMESPACE, 1);
121                   id = pool_rel2id(pool, idp, id, REL_AND, 1);
122                 }
123               else
124                 {
125                   p = buf + 9;
126                   p[strlen(p) - 1] = 0;
127                   id = pool_str2id(pool, p, 1);
128                   id = pool_rel2id(pool, NAMESPACE_MODALIAS, id, REL_NAMESPACE, 1);
129                 }
130               if (id)
131                 repo->idarraydata[i] = id;
132             }
133           else if (!strncmp(dep, "packageand(", 11) && strlen(dep) < sizeof(buf))
134             {
135               strcpy(buf, dep);
136               id = 0;
137               dep = buf + 11;
138               while ((p = strchr(dep, ':')) != 0)
139                 {
140                   if (p == dep)
141                     {
142                       dep = p + 1;
143                       continue;
144                     }
145                   /* argh, allow pattern: prefix. sigh */
146                   if (p - dep == 7 && !strncmp(dep, "pattern", 7))
147                     {
148                       p = strchr(p + 1, ':');
149                       if (!p)
150                         break;
151                     }
152                   *p++ = 0;
153                   idp = pool_str2id(pool, dep, 1);
154                   if (id)
155                     id = pool_rel2id(pool, id, idp, REL_AND, 1);
156                   else
157                     id = idp;
158                   dep = p;
159                 }
160               if (dep[0] && dep[1])
161                 {
162                   dep[strlen(dep) - 1] = 0;
163                   idp = pool_str2id(pool, dep, 1);
164                   if (id)
165                     id = pool_rel2id(pool, id, idp, REL_AND, 1);
166                   else
167                     id = idp;
168                 }
169               if (id)
170                 repo->idarraydata[i] = id;
171             }
172           else if (!strncmp(dep, "filesystem(", 11) && strlen(dep) < sizeof(buf))
173             {
174               strcpy(buf, dep + 11);
175               if ((p = strrchr(buf, ')')) != 0)
176                 *p = 0;
177               id = pool_str2id(pool, buf, 1);
178               id = pool_rel2id(pool, NAMESPACE_FILESYSTEM, id, REL_NAMESPACE, 1);
179               repo->idarraydata[i] = id;
180             }
181         }
182     }
183   if (freshens && repo->idarraydata[freshens])
184     {
185       Id idsupp = 0, idfresh = 0;
186       if (!supplements || !repo->idarraydata[supplements])
187         return freshens;
188       for (i = supplements; repo->idarraydata[i]; i++)
189         {
190           if (!idsupp)
191             idsupp = repo->idarraydata[i];
192           else
193             idsupp = pool_rel2id(pool, idsupp, repo->idarraydata[i], REL_OR, 1);
194         }
195       for (i = freshens; repo->idarraydata[i]; i++)
196         {
197           if (!idfresh)
198             idfresh = repo->idarraydata[i];
199           else
200             idfresh = pool_rel2id(pool, idfresh, repo->idarraydata[i], REL_OR, 1);
201         }
202       if (!idsupp)
203         idsupp = idfresh;
204       else
205         idsupp = pool_rel2id(pool, idsupp, idfresh, REL_AND, 1);
206       supplements = repo_addid_dep(repo, 0, idsupp, 0);
207     }
208   return supplements;
209 }
210
211 Offset
212 repo_fix_conflicts(Repo *repo, Offset conflicts)
213 {
214   char buf[1024], *p, *dep;
215   Pool *pool = repo->pool;
216   Id id;
217   int i;
218
219   if (!conflicts)
220     return conflicts;
221   for (i = conflicts; repo->idarraydata[i]; i++)
222     {
223       id = repo->idarraydata[i];
224       if (ISRELDEP(id))
225         continue;
226       dep = (char *)pool_id2str(pool, id);
227       if (!strncmp(dep, "otherproviders(", 15) && strlen(dep) < sizeof(buf) - 2)
228         {
229           strcpy(buf, dep + 15);
230           if ((p = strchr(buf, ')')) != 0)
231             *p = 0;
232           id = pool_str2id(pool, buf, 1);
233           id = pool_rel2id(pool, NAMESPACE_OTHERPROVIDERS, id, REL_NAMESPACE, 1);
234           repo->idarraydata[i] = id;
235         }
236     }
237   return conflicts;
238 }
239
240 void
241 repo_rewrite_suse_deps(Solvable *s, Offset freshens)
242 {
243   s->supplements = repo_fix_supplements(s->repo, s->provides, s->supplements, freshens);
244   if (s->conflicts)
245     s->conflicts = repo_fix_conflicts(s->repo, s->conflicts);
246 }
247
248 /**********************************************************************************/
249
250 static inline Id
251 dep2name(Pool *pool, Id dep)
252 {
253   while (ISRELDEP(dep))
254     {
255       Reldep *rd = GETRELDEP(pool, dep);
256       dep = rd->name;
257     }
258   return dep;
259 }
260
261 static int
262 providedbyinstalled_multiversion(Pool *pool, Map *installed, Id n, Id con)
263 {
264   Id p, pp;
265   Solvable *sn = pool->solvables + n;
266
267   FOR_PROVIDES(p, pp, sn->name)
268     {
269       Solvable *s = pool->solvables + p;
270       if (s->name != sn->name || s->arch != sn->arch)
271         continue;
272       if (!MAPTST(installed, p))
273         continue;
274       if (pool_match_nevr(pool, pool->solvables + p, con))
275         continue;
276       return 1;         /* found installed package that doesn't conflict */
277     }
278   return 0;
279 }
280
281 static inline int
282 providedbyinstalled(Pool *pool, Map *installed, Id dep, int ispatch, Map *multiversionmap)
283 {
284   Id p, pp;
285   FOR_PROVIDES(p, pp, dep)
286     {
287       if (p == SYSTEMSOLVABLE)
288         return -1;
289       if (ispatch && !pool_match_nevr(pool, pool->solvables + p, dep))
290         continue;
291       if (ispatch && multiversionmap && multiversionmap->size && MAPTST(multiversionmap, p) && ISRELDEP(dep))
292         if (providedbyinstalled_multiversion(pool, installed, p, dep))
293           continue;
294       if (MAPTST(installed, p))
295         return 1;
296     }
297   return 0;
298 }
299
300 /* xmap:
301  *  1: installed
302  *  2: conflicts with installed
303  *  8: interesting (only true if installed)
304  * 16: undecided
305  */
306
307 static int
308 providedbyinstalled_multiversion_xmap(Pool *pool, unsigned char *map, Id n, Id con) 
309 {
310   Id p, pp;
311   Solvable *sn = pool->solvables + n; 
312
313   FOR_PROVIDES(p, pp, sn->name)
314     {    
315       Solvable *s = pool->solvables + p; 
316       if (s->name != sn->name || s->arch != sn->arch)
317         continue;
318       if ((map[p] & 9) != 9)
319         continue;
320       if (pool_match_nevr(pool, pool->solvables + p, con))
321         continue;
322       return 1;         /* found installed package that doesn't conflict */
323     }    
324   return 0;
325 }
326
327
328 static inline int
329 providedbyinstalled_xmap(Pool *pool, unsigned char *map, Id dep, int ispatch, Map *multiversionmap)
330 {
331   Id p, pp;
332   int r = 0; 
333   FOR_PROVIDES(p, pp, dep) 
334     {    
335       if (p == SYSTEMSOLVABLE)
336         return 1;       /* always boring, as never constraining */
337       if (ispatch && !pool_match_nevr(pool, pool->solvables + p, dep))
338         continue;
339       if (ispatch && multiversionmap && multiversionmap->size && MAPTST(multiversionmap, p) && ISRELDEP(dep))
340         if (providedbyinstalled_multiversion_xmap(pool, map, p, dep))
341           continue;
342       if ((map[p] & 9) == 9)
343         return 9;
344       r |= map[p] & 17;
345     }    
346   return r;
347 }
348
349 /* FIXME: this mirrors policy_illegal_vendorchange */
350 static int
351 pool_illegal_vendorchange(Pool *pool, Solvable *s1, Solvable *s2)
352 {
353   Id v1, v2;
354   Id vendormask1, vendormask2;
355
356   if (pool->custom_vendorcheck)
357     return pool->custom_vendorcheck(pool, s1, s2);
358   /* treat a missing vendor as empty string */
359   v1 = s1->vendor ? s1->vendor : ID_EMPTY;
360   v2 = s2->vendor ? s2->vendor : ID_EMPTY;
361   if (v1 == v2)
362     return 0;
363   vendormask1 = pool_vendor2mask(pool, v1);
364   if (!vendormask1)
365     return 1;   /* can't match */
366   vendormask2 = pool_vendor2mask(pool, v2);
367   if ((vendormask1 & vendormask2) != 0)
368     return 0;
369   return 1;     /* no class matches */
370 }
371
372 /* check if this patch is relevant according to the vendor. To bad that patches
373  * don't have a vendor, so we need to do some careful repo testing. */
374 int
375 solvable_is_irrelevant_patch(Solvable *s, Map *installedmap)
376 {
377   Pool *pool = s->repo->pool;
378   Id con, *conp;
379   int hadpatchpackage = 0;
380
381   if (!s->conflicts)
382     return 0;
383   conp = s->repo->idarraydata + s->conflicts;
384   while ((con = *conp++) != 0)
385     {
386       Reldep *rd;
387       Id p, pp, p2, pp2;
388       if (!ISRELDEP(con))
389         continue;
390       rd = GETRELDEP(pool, con);
391       if (rd->flags != REL_LT)
392         continue;
393       FOR_PROVIDES(p, pp, con)
394         {
395           Solvable *si;
396           if (!MAPTST(installedmap, p))
397             continue;
398           si = pool->solvables + p;
399           if (!pool_match_nevr(pool, si, con))
400             continue;
401           FOR_PROVIDES(p2, pp2, rd->name)
402             {
403               Solvable *s2 = pool->solvables + p2;
404               if (!pool_match_nevr(pool, s2, rd->name))
405                 continue;
406               if (pool_match_nevr(pool, s2, con))
407                 continue;       /* does not fulfill patch */
408               if (s2->repo == s->repo)
409                 {
410                   hadpatchpackage = 1;
411                   /* ok, we have a package from the patch repo that solves the conflict. check vendor */
412                   if (si->vendor == s2->vendor)
413                     return 0;
414                   if (!pool_illegal_vendorchange(pool, si, s2))
415                     return 0;
416                   /* vendor change was illegal, ignore conflict */
417                 }
418             }
419         }
420     }
421   /* if we didn't find a patchpackage don't claim that the patch is irrelevant */
422   if (!hadpatchpackage)
423     return 0;
424   return 1;
425 }
426
427 /*
428  * solvable_trivial_installable_map - answers if a solvable is installable
429  * without any other installs/deinstalls.
430  * The packages considered to be installed are provided via the
431  * installedmap bitmap. A additional "conflictsmap" bitmap providing
432  * information about the conflicts of the installed packages can be
433  * used for extra speed up. Provide a NULL pointer if you do not
434  * have this information.
435  * Both maps can be created with pool_create_state_maps() or
436  * solver_create_state_maps().
437  *
438  * returns:
439  * 1:  solvable is installable without any other package changes
440  * 0:  solvable is not installable
441  * -1: solvable is installable, but doesn't constrain any installed packages
442  */
443 int
444 solvable_trivial_installable_map(Solvable *s, Map *installedmap, Map *conflictsmap, Map *multiversionmap)
445 {
446   Pool *pool = s->repo->pool;
447   Solvable *s2;
448   Id p, *dp;
449   Id *reqp, req;
450   Id *conp, con;
451   int r, interesting = 0;
452
453   if (conflictsmap && MAPTST(conflictsmap, s - pool->solvables))
454     return 0;
455   if (s->requires)
456     {
457       reqp = s->repo->idarraydata + s->requires;
458       while ((req = *reqp++) != 0)
459         {
460           if (req == SOLVABLE_PREREQMARKER)
461             continue;
462           r = providedbyinstalled(pool, installedmap, req, 0, 0);
463           if (!r)
464             return 0;
465           if (r > 0)
466             interesting = 1;
467         }
468     }
469   if (s->conflicts)
470     {
471       int ispatch = 0;
472
473       if (!strncmp("patch:", pool_id2str(pool, s->name), 6))
474         ispatch = 1;
475       conp = s->repo->idarraydata + s->conflicts;
476       while ((con = *conp++) != 0)
477         {
478           if (providedbyinstalled(pool, installedmap, con, ispatch, multiversionmap))
479             {
480               if (ispatch && solvable_is_irrelevant_patch(s, installedmap))
481                 return -1;
482               return 0;
483             }
484           if (!interesting && ISRELDEP(con))
485             {
486               con = dep2name(pool, con);
487               if (providedbyinstalled(pool, installedmap, con, ispatch, multiversionmap))
488                 interesting = 1;
489             }
490         }
491       if (ispatch && interesting && solvable_is_irrelevant_patch(s, installedmap))
492         interesting = 0;
493     }
494   if (!conflictsmap)
495     {
496       int i;
497
498       p = s - pool->solvables;
499       for (i = 1; i < pool->nsolvables; i++)
500         {
501           if (!MAPTST(installedmap, i))
502             continue;
503           s2 = pool->solvables + i;
504           if (!s2->conflicts)
505             continue;
506           conp = s2->repo->idarraydata + s2->conflicts;
507           while ((con = *conp++) != 0)
508             {
509               dp = pool_whatprovides_ptr(pool, con);
510               for (; *dp; dp++)
511                 if (*dp == p)
512                   return 0;
513             }
514         }
515      }
516   return interesting ? 1 : -1;
517 }
518
519 /*
520  * different interface for solvable_trivial_installable_map, where
521  * the information about the installed packages is provided
522  * by a queue.
523  */
524 int
525 solvable_trivial_installable_queue(Solvable *s, Queue *installed, Map *multiversionmap)
526 {
527   Pool *pool = s->repo->pool;
528   int i;
529   Id p;
530   Map installedmap;
531   int r;
532
533   map_init(&installedmap, pool->nsolvables);
534   for (i = 0; i < installed->count; i++)
535     {
536       p = installed->elements[i];
537       if (p > 0)                /* makes it work with decisionq */
538         MAPSET(&installedmap, p);
539     }
540   r = solvable_trivial_installable_map(s, &installedmap, 0, multiversionmap);
541   map_free(&installedmap);
542   return r;
543 }
544
545 /*
546  * different interface for solvable_trivial_installable_map, where
547  * the information about the installed packages is provided
548  * by a repo containing the installed solvables.
549  */
550 int
551 solvable_trivial_installable_repo(Solvable *s, Repo *installed, Map *multiversionmap)
552 {
553   Pool *pool = s->repo->pool;
554   Id p;
555   Solvable *s2;
556   Map installedmap;
557   int r;
558
559   map_init(&installedmap, pool->nsolvables);
560   FOR_REPO_SOLVABLES(installed, p, s2)
561     MAPSET(&installedmap, p);
562   r = solvable_trivial_installable_map(s, &installedmap, 0, multiversionmap);
563   map_free(&installedmap);
564   return r;
565 }
566
567 /*
568  * pool_trivial_installable - calculate if a set of solvables is
569  * trivial installable without any other installs/deinstalls of
570  * packages not belonging to the set.
571  *
572  * the state is returned in the result queue:
573  * 1:  solvable is installable without any other package changes
574  * 0:  solvable is not installable
575  * -1: solvable is installable, but doesn't constrain any installed packages
576  */
577
578 void
579 pool_trivial_installable_multiversionmap(Pool *pool, Map *installedmap, Queue *pkgs, Queue *res, Map *multiversionmap)
580 {
581   int i, r, m, did;
582   Id p, *dp, con, *conp, req, *reqp;
583   unsigned char *map;
584   Solvable *s;
585
586   map = solv_calloc(pool->nsolvables, 1);
587   for (p = 1; p < pool->nsolvables; p++)
588     {
589       if (!MAPTST(installedmap, p))
590         continue;
591       map[p] |= 9;
592       s = pool->solvables + p;
593       if (!s->conflicts)
594         continue;
595       conp = s->repo->idarraydata + s->conflicts;
596       while ((con = *conp++) != 0)
597         {
598           dp = pool_whatprovides_ptr(pool, con);
599           for (; *dp; dp++)
600             map[p] |= 2;        /* XXX: self conflict ? */
601         }
602     }
603   for (i = 0; i < pkgs->count; i++)
604     map[pkgs->elements[i]] = 16;
605
606   for (i = 0, did = 0; did < pkgs->count; i++, did++)
607     {
608       if (i == pkgs->count)
609         i = 0;
610       p = pkgs->elements[i];
611       if ((map[p] & 16) == 0)
612         continue;
613       if ((map[p] & 2) != 0)
614         {
615           map[p] = 2;
616           continue;
617         }
618       s = pool->solvables + p;
619       m = 1;
620       if (s->requires)
621         {
622           reqp = s->repo->idarraydata + s->requires;
623           while ((req = *reqp++) != 0)
624             {
625               if (req == SOLVABLE_PREREQMARKER)
626                 continue;
627               r = providedbyinstalled_xmap(pool, map, req, 0, 0);
628               if (!r)
629                 {
630                   /* decided and miss */
631                   map[p] = 2;
632                   did = 0;
633                   break;
634                 }
635               if (r == 16)
636                 break;  /* undecided */
637               m |= r;   /* 1 | 9 | 17 */
638             }
639           if (req)
640             continue;
641           if ((m & 9) == 9)
642             m = 9;
643         }
644       if (s->conflicts)
645         {
646           int ispatch = 0;      /* see solver.c patch handling */
647
648           if (!strncmp("patch:", pool_id2str(pool, s->name), 6))
649             ispatch = 1;
650           conp = s->repo->idarraydata + s->conflicts;
651           while ((con = *conp++) != 0)
652             {
653               if ((providedbyinstalled_xmap(pool, map, con, ispatch, multiversionmap) & 1) != 0)
654                 {
655                   map[p] = 2;
656                   did = 0;
657                   break;
658                 }
659               if ((m == 1 || m == 17) && ISRELDEP(con))
660                 {
661                   con = dep2name(pool, con);
662                   if ((providedbyinstalled_xmap(pool, map, con, ispatch, multiversionmap) & 1) != 0)
663                     m = 9;
664                 }
665             }
666           if (con)
667             continue;   /* found a conflict */
668         }
669       if (m != map[p])
670         {
671           map[p] = m;
672           did = 0;
673         }
674     }
675   queue_free(res);
676   queue_init_clone(res, pkgs);
677   for (i = 0; i < pkgs->count; i++)
678     {
679       m = map[pkgs->elements[i]];
680       if ((m & 9) == 9)
681         r = 1;
682       else if (m & 1)
683         r = -1;
684       else
685         r = 0;
686       res->elements[i] = r;
687     }
688   free(map);
689 }
690
691 void
692 pool_trivial_installable(Pool *pool, Map *installedmap, Queue *pkgs, Queue *res)
693 {
694   pool_trivial_installable_multiversionmap(pool, installedmap, pkgs, res, 0);
695 }
696
697 void
698 solver_trivial_installable(Solver *solv, Queue *pkgs, Queue *res)
699 {
700   Pool *pool = solv->pool;
701   Map installedmap;
702   int i;
703   pool_create_state_maps(pool,  &solv->decisionq, &installedmap, 0);
704   pool_trivial_installable_multiversionmap(pool, &installedmap, pkgs, res, solv->multiversion.size ? &solv->multiversion : 0);
705   for (i = 0; i < res->count; i++) 
706     if (res->elements[i] != -1)
707       {    
708         Solvable *s = pool->solvables + pkgs->elements[i];
709         if (!strncmp("patch:", pool_id2str(pool, s->name), 6) && solvable_is_irrelevant_patch(s, &installedmap))
710           res->elements[i] = -1;
711       }    
712   map_free(&installedmap);
713 }
714
715 void
716 solver_printtrivial(Solver *solv)
717 {
718   Pool *pool = solv->pool;
719   Queue in, out;
720   Id p;
721   const char *n; 
722   Solvable *s; 
723   int i;
724
725   queue_init(&in);
726   for (p = 1, s = pool->solvables + p; p < solv->pool->nsolvables; p++, s++)
727     {   
728       n = pool_id2str(pool, s->name);
729       if (strncmp(n, "patch:", 6) != 0 && strncmp(n, "pattern:", 8) != 0)
730         continue;
731       queue_push(&in, p); 
732     }   
733   if (!in.count)
734     {   
735       queue_free(&in);
736       return;
737     }   
738   queue_init(&out);
739   solver_trivial_installable(solv, &in, &out);
740   POOL_DEBUG(SOLV_DEBUG_RESULT, "trivial installable status:\n");
741   for (i = 0; i < in.count; i++)
742     POOL_DEBUG(SOLV_DEBUG_RESULT, "  %s: %d\n", pool_solvid2str(pool, in.elements[i]), out.elements[i]);
743   POOL_DEBUG(SOLV_DEBUG_RESULT, "\n");
744   queue_free(&in);
745   queue_free(&out);
746 }
747
748