Mailinglist Archive: zypp-commit (301 mails)

< Previous Next >
[zypp-commit] r7548 - /trunk/sat-solver/src/solver.c
  • From: mlschroe@xxxxxxxxxxxxxxxx
  • Date: Wed, 17 Oct 2007 16:30:58 -0000
  • Message-id: <20071017163058.7A31723E70@xxxxxxxxxxxxxxxx>
Author: mlschroe
Date: Wed Oct 17 18:30:58 2007
New Revision: 7548

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7548&view=rev
Log:
move solver reset to top of refine_suggestion

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

Modified: trunk/sat-solver/src/solver.c
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/solver.c?rev=7548&r1=7547&r2=7548&view=diff
==============================================================================
--- trunk/sat-solver/src/solver.c (original)
+++ trunk/sat-solver/src/solver.c Wed Oct 17 18:30:58 2007
@@ -2182,6 +2182,9 @@
   QUEUEEMPTY(refined);
   queuepush(refined, sug);
 
+  revert(solv, 1);
+  reset_solver(solv);
+
   /* re-enable all rules but rule "sug" of the problem */
   for (i = 0; problem[i]; i++)
     {
@@ -2196,8 +2199,6 @@
     }
   for (;;)
     {
-      revert(solv, 1);         /* XXX move to reset_solver? */
-      reset_solver(solv);
       QUEUEEMPTY(&solv->problems);
       run_solver(solv, 0, 0);
       if (!solv->problems.count)
@@ -2224,8 +2225,6 @@
        {
          /* no solution found, this was an invalid suggestion! */
          printf("no solution found!\n");
-         for (i = 0; i < refined->count; i++)
-           reenablerule(solv, solv->rules + refined->elements[i]);
          refined->count = 0;
          break;
        }
@@ -2257,6 +2256,8 @@
          printrule(solv, r);
 #endif
        }
+      revert(solv, 1);         /* XXX move to reset_solver? */
+      reset_solver(solv);
     }
   /* enable refined rules again */
   for (i = 0; i < disabled.count; i++)

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

< Previous Next >
This Thread
  • No further messages