- 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 48bb5f2..21c52c2 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;
 }