- fix assertion failue... again
authorMichael Schroeder <mls@suse.de>
Mon, 14 Sep 2009 14:33:36 +0000 (16:33 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 14 Sep 2009 14:33:36 +0000 (16:33 +0200)
- allow installed packages in infarch rule generation

src/rules.c
src/solver.c

index d264647..28111de 100644 (file)
@@ -1067,6 +1067,8 @@ solver_addinfarchrules(Solver *solv, Map *addedmap)
          a = (a <= pool->lastarch) ? pool->id2arch[a] : 0;
          if (a != 1 && bestarch && ((a ^ bestarch) & 0xffff0000) != 0)
            {
+             if (pool->installed && ps->repo == pool->installed)
+               continue;       /* always ok to keep an installed package */
              for (j = 0; j < allowedarchs.count; j++)
                {
                  aa = allowedarchs.elements[j];
index da5493c..6c1c34c 100644 (file)
@@ -1534,7 +1534,7 @@ solver_run_sat(Solver *solv, int disablerules, int doweak)
                        }
                      if (level <= olevel)
                        {
-                         if (level < passlevel)
+                         if (level == 1 || level < passlevel)
                            break;      /* trouble */
                          if (level < olevel)
                            n = installed->start;       /* redo all */
@@ -1557,7 +1557,7 @@ solver_run_sat(Solver *solv, int disablerules, int doweak)
                        }
                      if (level <= olevel)
                        {
-                         if (level < passlevel)
+                         if (level == 1 || level < passlevel)
                            break;      /* trouble */
                          if (level < olevel)
                            n = installed->start;       /* redo all */