summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/__init__.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 1aff570d0..2dc0b907f 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -2940,9 +2940,11 @@ class depgraph(object):
# Therefore, assume that such SLOT dependencies are already
# satisfied rather than forcing a rebuild.
if installed and not cpv_list and matched_packages \
- and vardb.cpv_exists(matched_packages[-1].cpv) and \
- portage.dep.dep_getslot(atom):
- cpv_list = [matched_packages[-1].cpv]
+ and portage.dep.dep_getslot(atom):
+ for pkg in matched_packages:
+ if vardb.cpv_exists(pkg.cpv):
+ cpv_list = [pkg.cpv]
+ break
if not cpv_list:
continue