- fix multiversion handling for real
authorMichael Schroeder <mls@suse.de>
Thu, 3 Sep 2009 13:41:25 +0000 (15:41 +0200)
committerMichael Schroeder <mls@suse.de>
Thu, 3 Sep 2009 13:41:25 +0000 (15:41 +0200)
src/pool.c

index 48bb5f252b6e90f6f9d8d501554f9253717a3012..21c52c203810d74edfaf3d8dd2c3570bd0f14331 100644 (file)
@@ -1544,7 +1544,7 @@ static inline Id dep2name(Pool *pool, Id dep)
   return dep;
 }
 
-static int providedbyinstalled_multiversion(Pool *pool, unsigned char *map, Id n, Id dep
+static int providedbyinstalled_multiversion(Pool *pool, unsigned char *map, Id n, Id con
 {
   Id p, pp;
   Solvable *sn = pool->solvables + n; 
@@ -1554,9 +1554,12 @@ static int providedbyinstalled_multiversion(Pool *pool, unsigned char *map, Id n
       Solvable *s = pool->solvables + p; 
       if (s->name != sn->name || s->arch != sn->arch)
         continue;
-      if ((map[p] & 9) == 9)
-        return 1;
-    }    
+      if ((map[p] & 9) != 9)
+        continue;
+      if (pool_match_nevr(pool, pool->solvables + p, con))
+       continue;
+      return 1;                /* found installed package that doesn't conflict */
+    }
   return 0;
 }