Mailinglist Archive: zypp-commit (301 mails)

< Previous Next >
[zypp-commit] r7473 - /trunk/sat-solver/src/solver.c
  • From: mlschroe@xxxxxxxxxxxxxxxx
  • Date: Tue, 09 Oct 2007 15:33:44 -0000
  • Message-id: <20071009153344.655A317442@xxxxxxxxxxxxxxxx>
Author: mlschroe
Date: Tue Oct  9 17:33:44 2007
New Revision: 7473

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7473&view=rev
Log:
- show better problem reports

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=7473&r1=7472&r2=7473&view=diff
==============================================================================
--- trunk/sat-solver/src/solver.c (original)
+++ trunk/sat-solver/src/solver.c Tue Oct  9 17:33:44 2007
@@ -2076,7 +2076,7 @@
     }
   for (;;)
     {
-      revert(solv, 1);
+      revert(solv, 1);         /* XXX move to reset_solver? */
       reset_solver(solv);
       QUEUEEMPTY(&solv->problems);
       run_solver(solv, 0, 0);
@@ -2139,7 +2139,6 @@
        }
     }
   /* enable refined rules again */
-  reset_solver(solv);
   for (i = 0; i < disabled.count; i++)
     reenablerule(solv, solv->rules + disabled.elements[i]);
   /* disable problem rules again so that we are in the same state as before */
@@ -2614,8 +2613,26 @@
                }
              else if (why >= solv->systemrules && why < solv->learntrules)
                {
+                 Solvable *sd = 0;
                  s = pool->solvables + solv->system->start + (why - solv->systemrules);
-                 printf("- allow deinstallation/downgrade of %s-%s.%s [%d]\n", id2str(pool, s->name), id2str(pool, s->evr), id2str(pool, s->arch), why);
+                 if (solv->weaksystemrules && solv->weaksystemrules[why - solv->systemrules])
+                   {
+                     Id *dp = pool->whatprovidesdata + solv->weaksystemrules[why - solv->systemrules];
+                     for (; *dp; dp++)
+                       if (solv->decisionmap[*dp] > 0)
+                         {
+                           sd = pool->solvables + *dp;
+                           break;
+                         }
+                   }
+                 if (sd)
+                   {
+                     printf("- allow downgrade of %s-%s.%s to %s-%s.%s\n", id2str(pool, s->name), id2str(pool, s->evr), id2str(pool, s->arch), id2str(pool, sd->name), id2str(pool, sd->evr), id2str(pool, sd->arch));
+                   }
+                 else
+                   {
+                     printf("- allow deinstallation of %s-%s.%s\n", id2str(pool, s->name), id2str(pool, s->evr), id2str(pool, s->arch));
+                   }
                }
              else
                {

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

< Previous Next >
This Thread
  • No further messages