src/suse.c
/* check if this patch is relevant according to the vendor. To bad that patches
 * don't have a vendor, so we need to do some careful repo testing. */
check if this patch is relevant according to the vendor. To bad that patches
don't have a vendor, so we need to do some careful repo testing.
check if this patch is relevant according to the vendor . To bad that patches don ' t have a vendor so we need to do some careful repo testing .
int
solvable_is_irrelevant_patch(Solvable *s, Map *installedmap)
{
  Pool *pool = s->repo->pool;
  Id con, *conp;
  int hadpatchpackage = 0;
  const char *status;
  status = solvable_lookup_str(s, UPDATE_STATUS);
  if (status && !strcmp(status, "retracted"))
    return 1;
  if (!s->conflicts)
    return 0;
  conp = s->repo->idarraydata + s->conflicts;
  while ((con = *conp++) != 0)
    {
      Reldep *rd;
      Id p, pp, p2, pp2;
      if (!ISRELDEP(con))
        continue;
      rd = GETRELDEP(pool, con);
      if (rd->flags != REL_LT)
        continue;
      FOR_PROVIDES(p, pp, con)
        {
          Solvable *si;
          if (!MAPTST(installedmap, p))
            continue;
          si = pool->solvables + p;
          if (!pool_match_nevr(pool, si, con))
            continue;
          FOR_PROVIDES(p2, pp2, rd->name)
            {
              Solvable *s2 = pool->solvables + p2;
              if (!pool_match_nevr(pool, s2, rd->name))
                continue;
              if (pool_match_nevr(pool, s2, con))
                continue;       
              if (s2->repo == s->repo)
                {
                  hadpatchpackage = 1;
                  if (si->vendor == s2->vendor)
                    return 0;
                  if (!pool_illegal_vendorchange(pool, si, s2))
                    return 0;
                }
            }
        }
    }
  if (!hadpatchpackage)
    return 0;
  return 1;
}
int solvable_is_irrelevant_patch ( Solvable * s , Map * installedmap ) { Pool * pool = s -> repo -> pool ; Id con , * conp ; int hadpatchpackage = 0 ; const char * status ; status = solvable_lookup_str ( s , UPDATE_STATUS ) ; if ( status && ! strcmp ( status , " " ) ) return 1 ; if ( ! s -> conflicts ) return 0 ; conp = s -> repo -> idarraydata + s -> conflicts ; while ( ( con = * conp ++ ) != 0 ) { Reldep * rd ; Id p , pp , p2 , pp2 ; if ( ! ISRELDEP ( con ) ) continue ; rd = GETRELDEP ( pool , con ) ; if ( rd -> flags != REL_LT ) continue ; FOR_PROVIDES ( p , pp , con ) { Solvable * si ; if ( ! MAPTST ( installedmap , p ) ) continue ; si = pool -> solvables + p ; if ( ! pool_match_nevr ( pool , si , con ) ) continue ; FOR_PROVIDES ( p2 , pp2 , rd -> name ) { Solvable * s2 = pool -> solvables + p2 ; if ( ! pool_match_nevr ( pool , s2 , rd -> name ) ) continue ; if ( pool_match_nevr ( pool , s2 , con ) ) continue ; if ( s2 -> repo == s -> repo ) { hadpatchpackage = 1 ; if ( si -> vendor == s2 -> vendor ) return 0 ; if ( ! pool_illegal_vendorchange ( pool , si , s2 ) ) return 0 ; } } } } if ( ! hadpatchpackage ) return 0 ; return 1 ; }
check if this patch is relevant according to the vendor.
check if this patch is relevant according to the vendor .
/* does not fulfill patch */ /* ok, we have a package from the patch repo that solves the conflict. check vendor */ /* vendor change was illegal, ignore conflict */ /* if we didn't find a patchpackage don't claim that the patch is irrelevant */