Author: matz Date: Tue Feb 12 11:17:08 2008 New Revision: 8619 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8619&view=rev Log: Introduce pool->considered. A map to select a subset of solvables for solving. As with whatprovides this currently lives in the pool and somewhen should probably be moved with it into Solver. Modified: trunk/sat-solver/src/pool.h trunk/sat-solver/src/solver.c Modified: trunk/sat-solver/src/pool.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/pool.h?rev=8619&r1=8618&r2=8619&view=diff ============================================================================== --- trunk/sat-solver/src/pool.h (original) +++ trunk/sat-solver/src/pool.h Tue Feb 12 11:17:08 2008 @@ -22,6 +22,7 @@ #include "pooltypes.h" #include "poolid.h" #include "solvable.h" +#include "bitmap.h" #include "queue.h" #include "strpool.h" @@ -104,6 +105,10 @@ Offset whatprovidesdataoff; /* next free slot within whatprovidesdata */ int whatprovidesdataleft; /* number of 'free slots' within whatprovidesdata */ + /* If nonzero, then consider only the solvables with Ids set in this + bitmap for solving. If zero, consider all solvables. */ + Map *considered; + Id (*nscallback)(struct _Pool *, void *data, Id name, Id evr); void *nscallbackdata; @@ -231,6 +236,12 @@ return 0; if (pool->id2arch && (s->arch > pool->lastarch || !pool->id2arch[s->arch])) return 0; + if (pool->considered) + { + Id id = s - pool->solvables; + if (!MAPTST(pool->considered, id)) + return 0; + } return 1; } Modified: trunk/sat-solver/src/solver.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/solver.c?rev=8619&r1=8618&r2=8619&view=diff ============================================================================== --- trunk/sat-solver/src/solver.c (original) +++ trunk/sat-solver/src/solver.c Tue Feb 12 11:17:08 2008 @@ -3832,4 +3832,3 @@ if (solv->problems.count) problems_to_solutions(solv, job); } - -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org