- if (s->requires)
- {
- reqp = s->repo->idarraydata + s->requires;
- while ((req = *reqp++) != 0)
- {
- if (req == SOLVABLE_PREREQMARKER)
- continue;
- r = providedbyinstalled(pool, installedmap, req, 0, 0);
- if (!r)
- return 0;
- if (r > 0)
- interesting = 1;
- }
- }
- if (s->conflicts)
- {
- int ispatch = 0;
-
- if (!strncmp("patch:", pool_id2str(pool, s->name), 6))
- ispatch = 1;
- conp = s->repo->idarraydata + s->conflicts;
- while ((con = *conp++) != 0)
- {
- if (providedbyinstalled(pool, installedmap, con, ispatch, noobsoletesmap))
- return 0;
- if (!interesting && ISRELDEP(con))
- {
- con = dep2name(pool, con);
- if (providedbyinstalled(pool, installedmap, con, ispatch, noobsoletesmap))
- interesting = 1;
- }
- }
- }
-#if 0
- if (s->repo)
- {
- Id *obsp, obs;
- Repo *installed = 0;
- if (s->obsoletes && s->repo != installed)
- {
- obsp = s->repo->idarraydata + s->obsoletes;
- while ((obs = *obsp++) != 0)
- {
- if (providedbyinstalled(pool, installedmap, obs, 0, 0))
- return 0;
- }
- }
- if (s->repo != installed)
- {
- Id pp;
- FOR_PROVIDES(p, pp, s->name)
- {
- s2 = pool->solvables + p;
- if (s2->repo == installed && s2->name == s->name)
- return 0;
- }
- }
- }
-#endif
- if (!conflictsmap)
- {
- int i;
-
- p = s - pool->solvables;
- for (i = 1; i < pool->nsolvables; i++)
- {
- if (!MAPTST(installedmap, i))
- continue;
- s2 = pool->solvables + i;
- if (!s2->conflicts)
- continue;
- conp = s2->repo->idarraydata + s2->conflicts;
- while ((con = *conp++) != 0)
- {
- dp = pool_whatprovides_ptr(pool, con);
- for (; *dp; dp++)
- if (*dp == p)
- return 0;
- }
- }
- }
- return interesting ? 1 : -1;
-}
-
-/*
- * different interface for solvable_trivial_installable_map, where
- * the information about the installed packages is provided
- * by a queue.
- */
-int
-solvable_trivial_installable_queue(Solvable *s, Queue *installed, Map *noobsoletesmap)
-{
- Pool *pool = s->repo->pool;
- int i;
- Id p;
- Map installedmap;
- int r;
-
- map_init(&installedmap, pool->nsolvables);
- for (i = 0; i < installed->count; i++)
+ pool = s->repo->pool;
+ if (solvable_lookup_void(s, SOLVABLE_SOURCENAME))
+ name = pool_id2str(pool, s->name);
+ else
+ name = solvable_lookup_str(s, SOLVABLE_SOURCENAME);
+ if (!name)
+ return 0;
+ archid = solvable_lookup_id(s, SOLVABLE_SOURCEARCH);
+ if (solvable_lookup_void(s, SOLVABLE_SOURCEEVR))
+ evr = evrid2vrstr(pool, s->evr);
+ else
+ evr = solvable_lookup_str(s, SOLVABLE_SOURCEEVR);
+ if (archid == ARCH_SRC || archid == ARCH_NOSRC)