Imported Upstream version 0.7.4
[platform/upstream/libsolv.git] / src / pool.c
index be6a419..09354ef 100644 (file)
@@ -27,6 +27,9 @@
 #include "util.h"
 #include "bitmap.h"
 #include "evr.h"
+#ifdef ENABLE_CONDA
+#include "conda.h"
+#endif
 
 #define SOLVABLE_BLOCK 255
 
@@ -158,6 +161,9 @@ pool_setdisttype(Pool *pool, int disttype)
     case DISTTYPE_HAIKU:
       pool->noarchid = ARCH_ANY;
       break;
+    case DISTTYPE_CONDA:
+      pool->noarchid = ARCH_ANY;
+      break;
     default:
       return -1;
     }
@@ -1281,6 +1287,23 @@ pool_addrelproviders(Pool *pool, Id d)
                queue_push(&plist, p);
            }
          break;
+#ifdef ENABLE_CONDA
+       case REL_CONDA:
+         wp = pool_whatprovides(pool, name);
+         if (evr)
+           {
+             const char *evrstr = pool_id2str(pool, evr);
+             pp = pool->whatprovidesdata + wp;
+             while ((p = *pp++) != 0)
+               {
+                 if (solvable_conda_matchversion(pool->solvables + p, evrstr))
+                   queue_push(&plist, p);
+                 else
+                   wp = 0;
+               }
+           }
+         break;
+#endif
        default:
          break;
        }
@@ -1598,7 +1621,7 @@ pool_setdebuglevel(Pool *pool, int level)
   if (level > 2)
     mask |= SOLV_DEBUG_PROPAGATE;
   if (level > 3)
-    mask |= SOLV_DEBUG_RULE_CREATION;
+    mask |= SOLV_DEBUG_RULE_CREATION | SOLV_DEBUG_WATCHES;
   mask |= pool->debugmask & SOLV_DEBUG_TO_STDERR;      /* keep bit */
   pool->debugmask = mask;
 }