summaryrefslogtreecommitdiffstats
path: root/pym/portage.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage.py')
-rw-r--r--pym/portage.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py
index ea1f820e7..e4df2ddd6 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -7304,6 +7304,14 @@ class dblink:
"%s:%s" % (self.mysplit[0], self.settings["SLOT"]))
if slot_matches:
# Used by self.isprotected().
+ max_cpv = None
+ max_counter = -1
+ for cur_cpv in slot_matches:
+ cur_counter = self.vartree.dbapi.cpv_counter(cur_cpv)
+ if cur_counter > max_counter:
+ max_counter = cur_counter
+ max_cpv = cur_cpv
+ slot_matches = [max_cpv]
self._installed_instance = dblink(self.cat,
catsplit(slot_matches[0])[1], destroot, self.settings,
vartree=self.vartree)