pool_addfileprovides;
pool_addfileprovides_queue;
pool_addrelproviders;
+ pool_addvendorclass;
pool_alloctmpspace;
pool_arch2color_slow;
pool_bin2hex;
solver_solution_count;
solver_solutionelement2str;
solver_solutionelement_count;
+ solver_solutionelement_internalid;
solver_solve;
solver_take_solution;
solver_take_solutionelement;
#endif
#ifdef DEBIAN
pool->allowselfconflicts = 1;
-# ifdef MULTI_SEMANTICS
pool->disttype = DISTTYPE_DEB;
-# endif
#endif
#ifdef RPM5
pool->obsoleteusesprovides = 1;
{
if (pid == name)
{
-#if defined(MULTI_SEMANTICS)
if (pool->disttype == DISTTYPE_DEB)
- continue;
- else
- break;
-#elif defined(DEBIAN_SEMANTICS)
- continue; /* unversioned provides can
- * never match versioned deps */
-#else
- break; /* yes, provides all versions */
-#endif
+ continue; /* unversioned provides can never match versioned deps */
+ break;
}
if (!ISRELDEP(pid))
continue; /* wrong provides name */
Id *languagecache;
int languagecacheother;
- /* flags to tell the library how the installed rpm works */
+ /* package manager type, deb/rpm */
+ int disttype;
+
+ /* flags to tell the library how the installed package manager works */
int promoteepoch; /* true: missing epoch is replaced by epoch of dependency */
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 noinstalledobsoletes; /* true: ignore obsoletes of installed packages */
int allowselfconflicts; /* true: packages which conflict with itself are installable */
-#ifdef MULTI_SEMANTICS
- int disttype;
-#endif
-
Id *id2arch; /* map arch ids to scores */
unsigned char *id2color; /* map arch ids to colors */
Id lastarch; /* last valid entry in id2arch/id2color */
bitmap for solving. If zero, consider all solvables. */
Map *considered;
+ /* callback for REL_NAMESPACE dependencies handled by the application */
Id (*nscallback)(struct _Pool *, void *data, Id name, Id evr);
void *nscallbackdata;
Datapos pos;
};
-#ifdef MULTI_SEMANTICS
-# define DISTTYPE_RPM 0
-# define DISTTYPE_DEB 1
-#endif
+#define DISTTYPE_RPM 0
+#define DISTTYPE_DEB 1
#define SOLV_FATAL (1<<0)
#define SOLV_ERROR (1<<1)
queue_empty(&pool->vendormap);
}
+void
+pool_addvendorclass(Pool *pool, const char **vendorclass)
+{
+ int i, j;
+
+ if (!vendorclass || !vendorclass[0])
+ return;
+ for (j = 1; vendorclass[j]; j++)
+ ;
+ i = 0;
+ if (pool->vendorclasses)
+ {
+ for (i = 0; pool->vendorclasses[i] || pool->vendorclasses[i + 1]; i++)
+ ;
+ if (i)
+ i++;
+ }
+ pool->vendorclasses = solv_realloc2(pool->vendorclasses, i + j + 2, sizeof(const char *));
+ for (j = 0; vendorclass[j]; j++)
+ pool->vendorclasses[i++] = solv_strdup(vendorclass[j]);
+ pool->vendorclasses[i++] = 0;
+ pool->vendorclasses[i] = 0;
+ queue_empty(&pool->vendormap);
+}
Id pool_vendor2mask(Pool *pool, Id vendor);
void pool_setvendorclasses(Pool *pool, const char **vendorclasses);
+void pool_addvendorclass(Pool *pool, const char **vendorclass);
#endif /* LIBSOLV_POOLVENDOR_H */
solv->solutions.elements[solstart] = (solv->solutions.count - (solstart + 1)) / 2;
queue_push(&solv->solutions, 0); /* add end marker */
queue_push(&solv->solutions, 0); /* add end marker */
+ queue_push(&solv->solutions, problem.elements[i]); /* just for bookkeeping */
solv->solutions.elements[solidx + 1 + nsol++] = solstart;
}
solv->solutions.elements[solidx + 1 + nsol] = 0; /* end marker */
return solv->solutions.elements[solidx];
}
+Id
+solver_solutionelement_internalid(Solver *solv, Id problem, Id solution)
+{
+ Id solidx = solv->problems.elements[problem * 2 - 1];
+ solidx = solv->solutions.elements[solidx + solution];
+ return solv->solutions.elements[solidx + 2 * solv->solutions.elements[solidx] + 3];
+}
+
/*
* return the next item of the proposed solution
unsigned int solver_solution_count(struct _Solver *solv, Id problem);
Id solver_next_solution(struct _Solver *solv, Id problem, Id solution);
unsigned int solver_solutionelement_count(struct _Solver *solv, Id problem, Id solution);
+Id solver_solutionelement_internalid(struct _Solver *solv, Id problem, Id solution);
Id solver_next_solutionelement(struct _Solver *solv, Id problem, Id solution, Id element, Id *p, Id *rp);
void solver_take_solutionelement(struct _Solver *solv, Id p, Id rp, Queue *job);