{
p[nl++] = '-';
strncpy(p + nl, e, el);
+ p[nl + el] = 0;
}
if (al)
{
return str;
}
#ifdef ENABLE_LINKED_PKGS
- /* autopattern translation magic */
- if (pass && !strncmp("pattern:", pool_id2str(pool, name), 8) && (name = find_autopattern_name(pool, s)) != 0)
- pass = -1;
+ /* autopattern/product translation magic */
+ if (pass)
+ {
+ const char *n = pool_id2str(pool, name);
+ if (*n == 'p')
+ {
+ if (!strncmp("pattern:", n, 8) && (name = find_autopattern_name(pool, s)) != 0)
+ pass = -1;
+ if (!strncmp("product:", n, 8) && (name = find_autoproduct_name(pool, s)) != 0)
+ pass = -1;
+ }
+ }
#endif
}
return usebase ? basestr : 0;
str = pool_tmpappend(pool, str, ".", pool_id2str(pool, archid));
return pool_tmpappend(pool, str, ".rpm", 0);
}
- else
+ else
return name; /* FIXME */
}
{
while (ISRELDEP(dep))
{
- Reldep *rd = rd = GETRELDEP(pool, dep);
+ Reldep *rd = GETRELDEP(pool, dep);
dep = rd->name;
}
return dep;
}
-static int providedbyinstalled_multiversion(Pool *pool, Map *installed, Id n, Id con)
+static int providedbyinstalled_multiversion(Pool *pool, Map *installed, Id n, Id con)
{
Id p, pp;
- Solvable *sn = pool->solvables + n;
+ Solvable *sn = pool->solvables + n;
FOR_PROVIDES(p, pp, sn->name)
- {
- Solvable *s = pool->solvables + p;
+ {
+ Solvable *s = pool->solvables + p;
if (s->name != sn->name || s->arch != sn->arch)
continue;
if (!MAPTST(installed, p))
if (pool_match_nevr(pool, pool->solvables + p, con))
continue;
return 1; /* found installed package that doesn't conflict */
- }
+ }
return 0;
}
static int
pool_illegal_vendorchange(Pool *pool, Solvable *s1, Solvable *s2)
{
- Id v1, v2;
+ Id v1, v2;
Id vendormask1, vendormask2;
if (pool->custom_vendorcheck)
/* treat a missing vendor as empty string */
v1 = s1->vendor ? s1->vendor : ID_EMPTY;
v2 = s2->vendor ? s2->vendor : ID_EMPTY;
- if (v1 == v2)
+ if (v1 == v2)
return 0;
vendormask1 = pool_vendor2mask(pool, v1);
if (!vendormask1)
/*
* Create maps containing the state of each solvable. Input is a "installed" queue,
* it contains all solvable ids that are considered to be installed.
- *
+ *
* The created maps can be used for solvable_trivial_installable_map(),
* pool_calc_duchanges(), pool_calc_installsizechange().
*