From: Michael Schroeder Date: Wed, 15 May 2013 14:48:59 +0000 (+0200) Subject: Lookat at keepexplicitobsoletes when creating update rules for multiversion packages X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bd3b30a6000ec396e4ac6ec927af815e52e1e11;p=thirdparty%2Flibsolv.git Lookat at keepexplicitobsoletes when creating update rules for multiversion packages --- diff --git a/src/rules.c b/src/rules.c index 317dc773..320d7775 100644 --- a/src/rules.c +++ b/src/rules.c @@ -945,8 +945,15 @@ solver_addupdaterule(Solver *solv, Solvable *s, int allow_all) { if (MAPTST(&solv->multiversion, qs.elements[i])) { - /* it's ok if they have same nevra */ Solvable *ps = pool->solvables + qs.elements[i]; + /* if keepexplicitobsoletes is set and the name is different, + * we assume that there is an obsoletes. XXX: not 100% correct */ + if (solv->keepexplicitobsoletes && ps->name != s->name) + { + qs.elements[j++] = qs.elements[i]; + continue; + } + /* it's ok if they have same nevra */ if (ps->name != s->name || ps->evr != s->evr || ps->arch != s->arch) continue; }