+ if ((flags & SELECTION_MAYBESRC) != 0 && (flags & SELECTION_NAME) != 0)
+ {
+ /* src rpms don't have provides, so we must check every solvable */
+ FOR_PROVIDES(p, pp, id) /* try fast path first */
+ {
+ Solvable *s = pool->solvables + p;
+ if (s->name == id)
+ {
+ if ((flags & SELECTION_INSTALLED_ONLY) != 0 && s->repo != pool->installed)
+ continue;
+ queue_push2(selection, SOLVER_SOLVABLE_NAME, id);
+ return SELECTION_NAME;
+ }
+ }
+ FOR_POOL_SOLVABLES(p) /* slow path */
+ {
+ Solvable *s = pool->solvables + p;
+ if (s->name == id && (s->arch == ARCH_SRC || s->arch == ARCH_NOSRC))
+ {
+ if ((flags & SELECTION_INSTALLED_ONLY) != 0 && s->repo != pool->installed)
+ continue; /* just in case... src rpms can't be installed */
+ queue_push2(selection, SOLVER_SOLVABLE_NAME, id);
+ return SELECTION_NAME;
+ }
+ }
+ }