]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
fixed mean bug in an optimization of addrule:
authorStephan Kulow <coolo@suse.de>
Sun, 21 Oct 2007 07:35:23 +0000 (07:35 +0000)
committerStephan Kulow <coolo@suse.de>
Sun, 21 Oct 2007 07:35:23 +0000 (07:35 +0000)
Differ between binary rules and non-binary rules
with one literal (e.g. two kernels)
(fixed 5 test cases)

src/solver.c

index 07373d10eecf55e48b389db9cc8489f59dc0acd8..a20b8b3988212c60c00c5804bffffe145dc7851b 100644 (file)
@@ -623,10 +623,13 @@ addrule(Solver *solv, Id p, Id d)
       n = 1;                          /* re-set n, was used as temp var */
     }
 
+  /* check if the last added rule is exactly the same as what we're looking for.
+   * Differ between binary rules and non-binary rules with one literal (e.g. two kernels) */
   if (r
       && n == 1
       && r->p == p
-      && r->w2 == d)
+      && ( ( !r->d && r->w2 == d )
+          || r->d == d))
   {
     return r;
   }