Mailinglist Archive: zypp-commit (301 mails)

< Previous Next >
[zypp-commit] r7503 - /trunk/sat-solver/src/solver.c
  • From: coolo@xxxxxxxxxxxxxxxx
  • Date: Fri, 12 Oct 2007 15:14:35 -0000
  • Message-id: <20071012151435.552D5454F7@xxxxxxxxxxxxxxxx>
Author: coolo
Date: Fri Oct 12 17:14:34 2007
New Revision: 7503

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7503&view=rev
Log:
- fixing obsoletes not checked in every case (fixing one test case -
  mls)
- adding a GNADENLOS mode not set by default (fixing 6 more, but
  degrades performance by 28%)

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=7503&r1=7502&r2=7503&view=diff
==============================================================================
--- trunk/sat-solver/src/solver.c (original)
+++ trunk/sat-solver/src/solver.c Fri Oct 12 17:14:34 2007
@@ -906,6 +906,35 @@
   if (m && !MAPTST(m, n))      /* add rule for s if not already done */
     addrulesforsolvable(solv, s, m);
 
+#if defined(GNADENLOS)
+  for (p = 1; p < pool->nsolvables; ++p)
+    {
+       if (p == n)
+        continue;
+
+       if (s->name == pool->solvables[p].name) 
+         continue;
+
+       if ((obsp = pool->solvables[p].obsoletes) != 0)   /* provides/obsoletes combination ? */
+        {
+          while ((obs = *obsp++) != 0)  /* for all obsoletes */
+            {
+              FOR_PROVIDES(p2, pp2, obs)   /* and all matching providers of the obsoletes */
+                {
+                  if (p2 == n)          /* match ! */
+                    break;
+                }
+              if (p2)                   /* match! */
+                break;
+            }
+          if (!obs)                     /* continue if no match */
+            continue;
+     
+         queuepush(qs, p); 
+       }
+    }
+#endif
+
   /*
    * look for updates for s
    */
@@ -923,6 +952,7 @@
          if (!allowarchchange && archchanges(pool, s, pool->solvables + p))
            continue;
        }
+#if !defined(GNADENLOS)
       else if ((obsp = pool->solvables[p].obsoletes) != 0)   /* provides/obsoletes combination ? */
        {
          while ((obs = *obsp++) != 0)  /* for all obsoletes */
@@ -941,6 +971,9 @@
           * thus flagging p as a valid update candidate for s
           */
        }
+#endif
+      else
+        continue;
       queuepush(qs, p);
 
       if (m && !MAPTST(m, p))          /* mark p for install if not already done */

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

< Previous Next >
This Thread
  • No further messages