]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Also call prefer_favored at the end of reorder_dq_for_jobrules
authorMichael Schroeder <mls@suse.de>
Tue, 3 May 2016 15:39:05 +0000 (17:39 +0200)
committerMichael Schroeder <mls@suse.de>
Tue, 3 May 2016 15:39:05 +0000 (17:39 +0200)
Otherwise we may select the wrong package.

src/policy.c
src/policy.h
src/solver.c

index 528c8c9803cf3130a309c0f4c7e0f131948d5e68..8b8412ddcfddd6f77612af2fae9f069fb830f1a2 100644 (file)
@@ -498,8 +498,8 @@ sort_by_favorq(Queue *favorq, Id *el, int cnt)
 }
 
 /* bring favored packages to front and disfavored packages to back */
-static void
-prefer_favored(Solver *solv, Queue *plist)
+void
+policy_prefer_favored(Solver *solv, Queue *plist)
 {
   int i, fav, disfav, count;
   if (!solv->favormap.size)
@@ -1210,7 +1210,7 @@ policy_filter_unwanted(Solver *solv, Queue *plist, int mode)
       dislike_old_versions(pool, plist);
       sort_by_common_dep(pool, plist);
       prefer_suggested(solv, plist);
-      prefer_favored(solv, plist);
+      policy_prefer_favored(solv, plist);
       return;
     }
   if (plist->count > 1)
@@ -1236,7 +1236,7 @@ policy_filter_unwanted(Solver *solv, Queue *plist, int mode)
          dislike_old_versions(pool, plist);
          sort_by_common_dep(pool, plist);
          prefer_suggested(solv, plist);
-         prefer_favored(solv, plist);
+         policy_prefer_favored(solv, plist);
        }
     }
 }
index 8f875c79a65ec0f01898458880d0ada0f3a887f1..0c3c7cb018e67f33958456fb22691e2a2f6c6aa5 100644 (file)
@@ -40,6 +40,7 @@ extern void policy_create_obsolete_index(Solver *solv);
 
 /* internal, do not use */
 extern void prune_to_best_version(Pool *pool, Queue *plist);
+extern void policy_prefer_favored(Solver *solv, Queue *plist);
 
 
 #ifdef __cplusplus
index cd9df6f2e2bcabc0183b6b3181d4de70513be4c2..dc42dcdcec36c53586aa6cfaf980ce9ecde762aa 100644 (file)
@@ -1432,6 +1432,8 @@ reorder_dq_for_jobrules(Solver *solv, int level, Queue *dq)
       solv->recommends_index = -1;
       queue_truncate(&solv->decisionq, decisionqcount);
     }
+  /* but obey favored maps */
+  policy_prefer_favored(solv, dq);
 }
 
 /*-------------------------------------------------------------------