Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11787 - in /trunk/sat-solver/src: policy.c solver.c
  • From: mlschroe@xxxxxxxxxxxxxxxx
  • Date: Mon, 24 Nov 2008 14:24:29 -0000
  • Message-id: <20081124142429.5588827F05@xxxxxxxxxxxxxxxx>
Author: mlschroe
Date: Mon Nov 24 15:24:28 2008
New Revision: 11787

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11787&view=rev
Log:
- remove no longer needed pattern check, log minimization steps

Modified:
trunk/sat-solver/src/policy.c
trunk/sat-solver/src/solver.c

Modified: trunk/sat-solver/src/policy.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/policy.c?rev=11787&r1=11786&r2=11787&view=diff
==============================================================================
--- trunk/sat-solver/src/policy.c (original)
+++ trunk/sat-solver/src/policy.c Mon Nov 24 15:24:28 2008
@@ -51,18 +51,6 @@
* is not depending on some random solvable order */
na = id2str(pool, sa->name);
nb = id2str(pool, sb->name);
- /* bring patterns to the front */
- /* XXX: no longer needed? */
- if (!strncmp(na, "pattern:", 8))
- {
- if (strncmp(nb, "pattern:", 8))
- return -1;
- }
- else if (!strncmp(nb, "pattern:", 8))
- {
- if (strncmp(na, "pattern:", 8))
- return 1;
- }
return strcmp(na, nb);
}
/* the same name, bring installed solvables to the front */

Modified: trunk/sat-solver/src/solver.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/solver.c?rev=11787&r1=11786&r2=11787&view=diff
==============================================================================
--- trunk/sat-solver/src/solver.c (original)
+++ trunk/sat-solver/src/solver.c Mon Nov 24 15:24:28 2008
@@ -2456,6 +2456,7 @@
Solvable *s;
Pool *pool = solv->pool;
Id p, *dp;
+ int minimizationsteps;

IF_POOLDEBUG (SAT_DEBUG_RULE_CREATION)
{
@@ -2488,6 +2489,7 @@
* with step 1
*/

+ minimizationsteps = 0;
for (;;)
{
/*
@@ -3000,6 +3002,7 @@
p = solv->branches.elements[lasti];
solv->branches.elements[lasti] = 0;
POOL_DEBUG(SAT_DEBUG_STATS, "minimizing %d -> %d with %s\n",
solv->decisionmap[p], l, solvable2str(pool, pool->solvables + p));
+ minimizationsteps++;

level = lastl;
revert(solv, level);
@@ -3016,7 +3019,7 @@
}
break;
}
- POOL_DEBUG(SAT_DEBUG_STATS, "solver statistics: %d learned rules, %d
unsolvable\n", solv->stats_learned, solv->stats_unsolvable);
+ POOL_DEBUG(SAT_DEBUG_STATS, "solver statistics: %d learned rules, %d
unsolvable, %d minimization steps\n", solv->stats_learned,
solv->stats_unsolvable, minimizationsteps);

POOL_DEBUG(SAT_DEBUG_STATS, "done solving.\n\n");
queue_free(&dq);

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages