+ if (s->recommends && s->repo != installed)
+ {
+ Id rec, *recp;
+ recp = s->repo->idarraydata + s->recommends;
+ while ((rec = *recp++) != 0)
+ {
+ queue_empty(&depq);
+ FOR_PROVIDES(p2, pp2, rec)
+ {
+ s2 = pool->solvables + p2;
+ if (p2 == p)
+ {
+ depq.count = 0; /* self provides */
+ break;
+ }
+ if (s2->repo == installed && !MAPTST(&trans->transactsmap, p2))
+ continue;
+ if (s2->repo != installed && !MAPTST(&trans->transactsmap, p2))
+ continue; /* package stays uninstalled */
+ if (s2->repo != installed)
+ queue_pushunique(&depq, p2);
+ }
+ for (i = 0; i < depq.count; i++)
+ {
+ p2 = depq.elements[i];
+ if (pool->solvables[p2].repo != installed)
+ {
+#if 0
+ printf("add recommends inst->inst edge (%s -> %s -> %s)\n", pool_solvid2str(pool, p), pool_dep2str(pool, rec), pool_solvid2str(pool, p2));
+#endif
+ addedge(od, p, p2, TYPE_REC);
+ }
+ }
+ }
+ }
+ if (s->suggests && s->repo != installed)
+ {
+ Id sug, *sugp;
+ sugp = s->repo->idarraydata + s->suggests;
+ while ((sug = *sugp++) != 0)
+ {
+ queue_empty(&depq);
+ FOR_PROVIDES(p2, pp2, sug)
+ {
+ s2 = pool->solvables + p2;
+ if (p2 == p)
+ {
+ depq.count = 0; /* self provides */
+ break;
+ }
+ if (s2->repo == installed && !MAPTST(&trans->transactsmap, p2))
+ continue;
+ if (s2->repo != installed && !MAPTST(&trans->transactsmap, p2))
+ continue; /* package stays uninstalled */
+ if (s2->repo != installed)
+ queue_pushunique(&depq, p2);
+ }
+ for (i = 0; i < depq.count; i++)
+ {
+ p2 = depq.elements[i];
+ if (pool->solvables[p2].repo != installed)
+ {
+#if 0
+ printf("add suggests inst->inst edge (%s -> %s -> %s)\n", pool_solvid2str(pool, p), pool_dep2str(pool, sug), pool_solvid2str(pool, p2));
+#endif
+ addedge(od, p, p2, TYPE_SUG);
+ }
+ }
+ }
+ }
+ if (s->repo == installed && solvable_lookup_idarray(s, SOLVABLE_TRIGGERS, &depq) && depq.count)