+int
+pool_setdisttype(Pool *pool, int disttype)
+{
+#ifdef MULTI_SEMANTICS
+ int olddisttype = pool->disttype;
+ switch(disttype)
+ {
+ case DISTTYPE_RPM:
+ pool->noarchid = ARCH_NOARCH;
+ break;
+ case DISTTYPE_DEB:
+ pool->noarchid = ARCH_ALL;
+ break;
+ case DISTTYPE_ARCH:
+ case DISTTYPE_HAIKU:
+ pool->noarchid = ARCH_ANY;
+ break;
+ default:
+ return -1;
+ }
+ pool->disttype = disttype;
+ pool->solvables[SYSTEMSOLVABLE].arch = pool->noarchid;
+ return olddisttype;
+#else
+ return pool->disttype == disttype ? disttype : -1;
+#endif
+}
+
+int
+pool_get_flag(Pool *pool, int flag)
+{
+ switch (flag)
+ {
+ case POOL_FLAG_PROMOTEEPOCH:
+ return pool->promoteepoch;
+ case POOL_FLAG_FORBIDSELFCONFLICTS:
+ return pool->forbidselfconflicts;
+ case POOL_FLAG_OBSOLETEUSESPROVIDES:
+ return pool->obsoleteusesprovides;
+ case POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES:
+ return pool->implicitobsoleteusesprovides;
+ case POOL_FLAG_OBSOLETEUSESCOLORS:
+ return pool->obsoleteusescolors;
+ case POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS:
+ return pool->implicitobsoleteusescolors;
+ case POOL_FLAG_NOINSTALLEDOBSOLETES:
+ return pool->noinstalledobsoletes;
+ case POOL_FLAG_HAVEDISTEPOCH:
+ return pool->havedistepoch;
+ case POOL_FLAG_NOOBSOLETESMULTIVERSION:
+ return pool->noobsoletesmultiversion;
+ case POOL_FLAG_ADDFILEPROVIDESFILTERED:
+ return pool->addfileprovidesfiltered;
+ default:
+ break;
+ }
+ return -1;
+}
+
+int
+pool_set_flag(Pool *pool, int flag, int value)
+{
+ int old = pool_get_flag(pool, flag);
+ switch (flag)
+ {
+ case POOL_FLAG_PROMOTEEPOCH:
+ pool->promoteepoch = value;
+ break;
+ case POOL_FLAG_FORBIDSELFCONFLICTS:
+ pool->forbidselfconflicts = value;
+ break;
+ case POOL_FLAG_OBSOLETEUSESPROVIDES:
+ pool->obsoleteusesprovides = value;
+ break;
+ case POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES:
+ pool->implicitobsoleteusesprovides = value;
+ break;
+ case POOL_FLAG_OBSOLETEUSESCOLORS:
+ pool->obsoleteusescolors = value;
+ break;
+ case POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS:
+ pool->implicitobsoleteusescolors = value;
+ break;
+ case POOL_FLAG_NOINSTALLEDOBSOLETES:
+ pool->noinstalledobsoletes = value;
+ break;
+ case POOL_FLAG_HAVEDISTEPOCH:
+ pool->havedistepoch = value;
+ break;
+ case POOL_FLAG_NOOBSOLETESMULTIVERSION:
+ pool->noobsoletesmultiversion = value;
+ break;
+ case POOL_FLAG_ADDFILEPROVIDESFILTERED:
+ pool->addfileprovidesfiltered = value;
+ break;
+ default:
+ break;
+ }
+ return old;
+}
+
+