summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/depgraph.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-05-22 16:48:42 -0700
committerZac Medico <zmedico@gentoo.org>2011-05-22 16:48:42 -0700
commit6e6b9c5928e175af42615542866fc9b3aef694e6 (patch)
treee63d0ba023a6e9af3a7ff5f1d75c9465eaa662ad /pym/_emerge/depgraph.py
parent666fe9ab262e0c1307eeecc08e204966aefdf0c0 (diff)
downloadportage-6e6b9c5928e175af42615542866fc9b3aef694e6.tar.gz
portage-6e6b9c5928e175af42615542866fc9b3aef694e6.tar.bz2
portage-6e6b9c5928e175af42615542866fc9b3aef694e6.zip
_add_pkg_dep_string: handle satisfied virt_dep
This fixes a problem with the asap LIBC_PACKAGE_ATOM test case for bug #303567.
Diffstat (limited to 'pym/_emerge/depgraph.py')
-rw-r--r--pym/_emerge/depgraph.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index caf150ac5..37fdeeda3 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -1571,6 +1571,20 @@ class depgraph(object):
if not dep_priority.ignored or \
self._dynamic_config._traverse_ignored_deps:
+
+ inst_pkgs = [inst_pkg for inst_pkg in vardb.match_pkgs(virt_dep.atom)
+ if not reinstall_atoms.findAtomForPackage(inst_pkg,
+ modified_use=self._pkg_use_enabled(inst_pkg))]
+ if inst_pkgs:
+ for inst_pkg in inst_pkgs:
+ if self._pkg_visibility_check(inst_pkg):
+ # highest visible
+ virt_dep.priority.satisfied = inst_pkg
+ break
+ if not virt_dep.priority.satisfied:
+ # none visible, so use highest
+ virt_dep.priority.satisfied = inst_pkgs[0]
+
if not self._add_pkg(virt_pkg, virt_dep):
return 0