static void * fileconflict_cb(Pool *pool, Id p, void *cbdata) { struct fcstate *fcstate = cbdata; Solvable *s; Id rpmdbid; int i; FILE *fp; s = pool_id2solvable(pool, p); if (pool->installed && s->repo == pool->installed) { if (!s->repo->rpmdbid) return 0; rpmdbid = s->repo->rpmdbid[p - s->repo->start]; if (!rpmdbid) return 0; return rpm_byrpmdbid(fcstate->rpmstate, rpmdbid); } for (i = 0; i < fcstate->newpkgscnt; i++) if (fcstate->checkq->elements[i] == p) break; if (i == fcstate->newpkgscnt) return 0; fp = fcstate->newpkgsfps[i]; if (!fp) return 0; rewind(fp); return rpm_byfp(fcstate->rpmstate, fp, pool_solvable2str(pool, s)); }
static void * iterate_handle(Pool *pool, Id p, void *cbdata) { Solvable *s = pool->solvables + p; Id rpmdbid; if (!p) { rpm_byrpmdbid(0, 0, (void **)cbdata); return 0; } if (!s->repo->rpmdbid) return 0; rpmdbid = s->repo->rpmdbid[p - s->repo->start]; if (!rpmdbid) return 0; return rpm_byrpmdbid(rpmdbid, 0, (void **)cbdata); }