add POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS to match the current rpm behaviour
[platform/upstream/libsolv.git] / src / pool.h
index 7dcf916..a3cb364 100644 (file)
@@ -128,6 +128,7 @@ struct _Pool {
   int obsoleteusesprovides;    /* true: obsoletes are matched against provides, not names */
   int implicitobsoleteusesprovides;    /* true: implicit obsoletes due to same name are matched against provides, not names */
   int obsoleteusescolors;      /* true: obsoletes check arch color */
+  int implicitobsoleteusescolors;      /* true: implicit obsoletes check arch color */
   int noinstalledobsoletes;    /* true: ignore obsoletes of installed packages */
   int forbidselfconflicts;     /* true: packages which conflict with itself are not installable */
   int noobsoletesmultiversion; /* true: obsoletes are ignored for multiversion installs */
@@ -150,6 +151,10 @@ struct _Pool {
   char *rootdir;
 
   int (*custom_vendorcheck)(struct _Pool *, Solvable *, Solvable *);
+
+  int addfileprovidesfiltered; /* 1: only use filtered file list for addfileprovides */
+  int addedfileprovides;       /* true: application called addfileprovides */
+  Queue lazywhatprovidesq;     /* queue to store old whatprovides offsets */
 #endif
 };
 
@@ -183,6 +188,8 @@ struct _Pool {
 #define POOL_FLAG_NOINSTALLEDOBSOLETES                 6
 #define POOL_FLAG_HAVEDISTEPOCH                                7
 #define POOL_FLAG_NOOBSOLETESMULTIVERSION              8
+#define POOL_FLAG_ADDFILEPROVIDESFILTERED              9
+#define POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS           10
 
 /* ----------------------------------------------- */
 
@@ -297,17 +304,23 @@ extern void pool_addfileprovides(Pool *pool);
 extern void pool_addfileprovides_queue(Pool *pool, Queue *idq, Queue *idqinst);
 extern void pool_freewhatprovides(Pool *pool);
 extern Id pool_queuetowhatprovides(Pool *pool, Queue *q);
+extern Id pool_searchlazywhatprovidesq(Pool *pool, Id d);
 
 extern Id pool_addrelproviders(Pool *pool, Id d);
 
 static inline Id pool_whatprovides(Pool *pool, Id d)
 {
-  Id v;
   if (!ISRELDEP(d))
-    return pool->whatprovides[d];
-  v = GETRELID(d);
-  if (pool->whatprovides_rel[v])
-    return pool->whatprovides_rel[v];
+    {
+      if (pool->whatprovides[d])
+       return pool->whatprovides[d];
+    }
+  else
+    {
+      Id v = GETRELID(d);
+      if (pool->whatprovides_rel[v])
+       return pool->whatprovides_rel[v];
+    }
   return pool_addrelproviders(pool, d);
 }
 
@@ -343,6 +356,7 @@ Id pool_lookup_id(Pool *pool, Id entry, Id keyname);
 unsigned long long pool_lookup_num(Pool *pool, Id entry, Id keyname, unsigned long long notfound);
 int pool_lookup_void(Pool *pool, Id entry, Id keyname);
 const unsigned char *pool_lookup_bin_checksum(Pool *pool, Id entry, Id keyname, Id *typep);
+int pool_lookup_idarray(Pool *pool, Id entry, Id keyname, Queue *q);
 const char *pool_lookup_checksum(Pool *pool, Id entry, Id keyname, Id *typep);
 const char *pool_lookup_deltalocation(Pool *pool, Id entry, unsigned int *medianrp);