summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/emerge/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 5c3ad335a..88637ee2f 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -4029,9 +4029,10 @@ def unmerge(settings, myopts, vartree, unmerge_action, unmerge_files,
best_slot = vartree.getslot(best_version)
best_counter = vartree.dbapi.cpv_counter(best_version)
for mypkg in mymatch[1:]:
- if mypkg == portage.best([mypkg, best_version]):
- myslot = vartree.getslot(mypkg)
- mycounter = vartree.dbapi.cpv_counter(mypkg)
+ myslot = vartree.getslot(mypkg)
+ mycounter = vartree.dbapi.cpv_counter(mypkg)
+ if (myslot == best_slot and mycounter > best_counter) or \
+ mypkg == portage.best([mypkg, best_version]):
if myslot == best_slot:
if mycounter < best_counter:
# On slot collision, keep the one with the