return dep;
}
-static inline int providedbyinstalled(Pool *pool, unsigned char *map, Id dep)
+static inline int providedbyinstalled(Pool *pool, unsigned char *map, Id dep, int ispatch)
{
Id p, pp;
int r = 0;
{
if (p == SYSTEMSOLVABLE)
return 1; /* always boring, as never constraining */
+ if (ispatch && !pool_match_nevr(pool, pool->solvables + p, dep))
+ continue;
if ((map[p] & 9) == 9)
return 9;
r |= map[p] & 17;
{
if (req == SOLVABLE_PREREQMARKER)
continue;
- r = providedbyinstalled(pool, map, req);
+ r = providedbyinstalled(pool, map, req, 0);
if (!r)
{
/* decided and miss */
}
if (s->conflicts)
{
+ int ispatch = 0; /* see solver.c patch handling */
+
+ if (!strncmp("patch:", id2str(pool, s->name), 6))
+ ispatch = 1;
conp = s->repo->idarraydata + s->conflicts;
while ((con = *conp++) != 0)
{
- if ((providedbyinstalled(pool, map, con) & 1) != 0)
+ if ((providedbyinstalled(pool, map, con, ispatch) & 1) != 0)
{
map[p] = 2;
break;
if ((m == 1 || m == 17) && ISRELDEP(con))
{
con = dep2name(pool, con);
- if ((providedbyinstalled(pool, map, con) & 1) != 0)
+ if ((providedbyinstalled(pool, map, con, ispatch) & 1) != 0)
m = 9;
}
}
obsp = s->repo->idarraydata + s->obsoletes;
while ((obs = *obsp++) != 0)
{
- if ((providedbyinstalled(pool, map, obs) & 1) != 0)
+ if ((providedbyinstalled(pool, map, obs, 0) & 1) != 0)
{
map[p] = 2;
break;