- fix probleminfo if solvable conflicts with itself and has no requires
authorMichael Schroeder <mls@suse.de>
Wed, 16 Apr 2008 16:22:01 +0000 (16:22 +0000)
committerMichael Schroeder <mls@suse.de>
Wed, 16 Apr 2008 16:22:01 +0000 (16:22 +0000)
src/solver.c

index 1952d28..6185612 100644 (file)
@@ -3011,20 +3011,22 @@ solver_problemruleinfo(Solver *solv, Queue *job, Id rid, Id *depp, Id *sourcep,
          return SOLVER_PROBLEM_NOT_INSTALLABLE;
        }
       /* check requires */
-      assert(s->requires);
-      reqp = s->repo->idarraydata + s->requires;
-      while ((req = *reqp++) != 0)
-       {
-         if (req == SOLVABLE_PREREQMARKER)
-           continue;
-         dp = pool_whatprovides(pool, req);
-         if (*dp == 0)
-           break;
-       }
-      if (req)
+      if (s->requires)
        {
-         *depp = req;
-         return SOLVER_PROBLEM_NOTHING_PROVIDES_DEP;
+         reqp = s->repo->idarraydata + s->requires;
+         while ((req = *reqp++) != 0)
+           {
+             if (req == SOLVABLE_PREREQMARKER)
+               continue;
+             dp = pool_whatprovides(pool, req);
+             if (*dp == 0)
+               break;
+           }
+         if (req)
+           {
+             *depp = req;
+             return SOLVER_PROBLEM_NOTHING_PROVIDES_DEP;
+           }
        }
       assert(!solv->allowselfconflicts);
       assert(s->conflicts);