]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Fix forcebest when there is no installed repo
authorMichael Schroeder <mls@suse.de>
Thu, 19 Oct 2017 12:18:42 +0000 (14:18 +0200)
committerMichael Schroeder <mls@suse.de>
Thu, 19 Oct 2017 12:18:42 +0000 (14:18 +0200)
src/rules.c

index f8f072e8cd44788e32fe9baf33c66ee2a33e6afd..b5f3e3e1c66e763c04856157da8b0e086ef8c68a 100644 (file)
@@ -3249,11 +3249,6 @@ solver_addbestrules(Solver *solv, int havebestinstalljobs)
   int i, oldcnt;
 
   solv->bestrules = solv->nrules;
-  if (!installed)
-    {
-      solv->bestrules_end = solv->nrules;
-      return;
-    }
   queue_init(&q);
   queue_init(&q2);
   queue_init(&r2pkg);
@@ -3293,7 +3288,7 @@ solver_addbestrules(Solver *solv, int havebestinstalljobs)
        }
     }
 
-  if (solv->bestupdatemap_all || solv->bestupdatemap.size)
+  if (installed && (solv->bestupdatemap_all || solv->bestupdatemap.size))
     {
       Map m;