From: Zac Medico Date: Fri, 20 Jul 2007 02:00:02 +0000 (-0000) Subject: Fix --prune so that it always correctly accounts for COUNTER when dealing with packag... X-Git-Tag: v2.2_pre1~988 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=70ab8ba6a2c4218071862ff1f394d79711252331;p=portage.git Fix --prune so that it always correctly accounts for COUNTER when dealing with packages in the same slot. svn path=/main/trunk/; revision=7313 --- 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