Author: schubi2 Date: Thu Jan 3 16:10:22 2008 New Revision: 8184 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8184&view=rev Log: comments added Modified: trunk/sat-solver/src/solver.c trunk/sat-solver/src/solver.h Modified: trunk/sat-solver/src/solver.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/solver.c?rev=8184&r1=8183&r2=8184&view=diff ============================================================================== --- trunk/sat-solver/src/solver.c (original) +++ trunk/sat-solver/src/solver.c Thu Jan 3 16:10:22 2008 @@ -158,7 +158,7 @@ break; printruleelement(solv, type, r, v); } - POOL_DEBUG(type, " next: %d %d\n", r->n1, r->n2); + POOL_DEBUG(type, " next rules: %d %d\n", r->n1, r->n2); } static void @@ -629,7 +629,7 @@ } /* only job and system rules left in the decisionq*/ - /* find the decision which is the "oposite" of the jobrule */ + /* find the decision which is the "opposite" of the jobrule */ for (i = 0; i < solv->decisionq.count; i++) if (solv->decisionq.elements[i] == -v) break; @@ -1199,6 +1199,24 @@ /*-----------------------------------------------------------------*/ /* watches */ +/* + * print watches + * + */ + +static void +printWatches(Solver *solv, int type) +{ + Pool *pool = solv->pool; + int counter; + + POOL_DEBUG(type, "Watches: \n"); + + for (counter = -(pool->nsolvables); counter <= pool->nsolvables; counter ++) + { + POOL_DEBUG(type, " solvable [%d] -- rule [%d]\n", counter, solv->watches[counter+pool->nsolvables]); + } +} /* * makewatches @@ -1286,6 +1304,7 @@ { POOL_DEBUG(SAT_DEBUG_PROPAGATE, "popagate for decision %d level %d\n", -pkg, level); printruleelement(solv, SAT_DEBUG_PROPAGATE, 0, -pkg); + printWatches(solv, SAT_DEBUG_SCHUBI); } for (rp = watches + pkg; *rp; rp = nrp) @@ -1300,12 +1319,12 @@ if (pkg == r->w1) { - ow = r->w2; + ow = r->w2; /* regard the second watchpoint to come to a solution */ nrp = &r->n1; } else { - ow = r->w1; + ow = r->w1; /* regard the first watchpoint to come to a solution */ nrp = &r->n2; } /* if clause is TRUE, nothing to do */ @@ -1354,7 +1373,7 @@ return r; /* eek, a conflict! */ IF_POOLDEBUG (SAT_DEBUG_PROPAGATE) { - POOL_DEBUG(SAT_DEBUG_PROPAGATE, "unit "); + POOL_DEBUG(SAT_DEBUG_PROPAGATE, " unit "); printrule(solv, SAT_DEBUG_PROPAGATE, r); } if (ow > 0) @@ -1367,9 +1386,9 @@ { Solvable *s = pool->solvables + (ow > 0 ? ow : -ow); if (ow > 0) - POOL_DEBUG(SAT_DEBUG_PROPAGATE, " -> decided to install %s\n", solvable2str(pool, s)); + POOL_DEBUG(SAT_DEBUG_PROPAGATE, " -> decided to install %s\n", solvable2str(pool, s)); else - POOL_DEBUG(SAT_DEBUG_PROPAGATE, " -> decided to conflict %s\n", solvable2str(pool, s)); + POOL_DEBUG(SAT_DEBUG_PROPAGATE, " -> decided to conflict %s\n", solvable2str(pool, s)); } } } Modified: trunk/sat-solver/src/solver.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/solver.h?rev=8184&r1=8183&r2=8184&view=diff ============================================================================== --- trunk/sat-solver/src/solver.h (original) +++ trunk/sat-solver/src/solver.h Thu Jan 3 16:10:22 2008 @@ -60,7 +60,7 @@ int noupdateprovide; /* true: update packages needs not to provide old package */ Rule *rules; /* all rules */ - Id nrules; /* rpm rules */ + Id nrules; /* index of the last rule */ Id jobrules; /* user rules */ Id systemrules; /* policy rules, e.g. keep packages installed or update. All literals > 0 */ -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org