]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Also check the installed package for multiversion
authorMichael Schroeder <mls@suse.de>
Wed, 30 Sep 2015 11:42:34 +0000 (13:42 +0200)
committerMichael Schroeder <mls@suse.de>
Wed, 30 Sep 2015 11:42:34 +0000 (13:42 +0200)
Thus, both the to-be-installed and the already installed
package must have the multiversion bit set.
Otherwise, a dependency verify later on will complain.

src/rules.c

index 3264e9b86f82f76e31a451481506fa43b8274497..b941986b7064afe6738582691deb1d0990fb3fad 100644 (file)
@@ -928,7 +928,13 @@ solver_addpkgrulesforsolvable(Solver *solv, Solvable *s, Map *m)
                  /* we still obsolete packages with same nevra, like rpm does */
                  /* (actually, rpm mixes those packages. yuck...) */
                  if (multi && (s->name != ps->name || s->evr != ps->evr || s->arch != ps->arch))
-                   continue;
+                   {
+                     if (isinstalled || ps->repo != installed)
+                       continue;
+                     /* also check the installed package for multi-ness */
+                     if (MAPTST(&solv->multiversion, p))
+                       continue;
+                   }
                  if (!pool->implicitobsoleteusesprovides && s->name != ps->name)
                    continue;
                  if (pool->implicitobsoleteusescolors && !pool_colormatch(pool, s, ps))
@@ -938,7 +944,7 @@ solver_addpkgrulesforsolvable(Solver *solv, Solvable *s, Map *m)
                  if (s->name == ps->name)
                    {
                      /* optimization: do not add the same-name conflict rule if it was
-                      * already added when we looket at the other package.
+                      * already added when we looked at the other package.
                       * (this assumes pool_colormatch is symmetric) */
                      if (p && m && ps->repo != installed && MAPTST(m, p) &&
                          (ps->arch != ARCH_SRC && ps->arch != ARCH_NOSRC) &&