summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-06-02 20:47:09 -0700
committerZac Medico <zmedico@gentoo.org>2011-06-02 20:47:09 -0700
commit336f02148b0a90e1933d7ca68a32f3bd5e9433d6 (patch)
treef8224a1c0558c0a9c9ccfd84e60a997c3f113368
parentbbe046fb2a74929db656b313234db3e691f3dc74 (diff)
downloadportage-336f02148b0a90e1933d7ca68a32f3bd5e9433d6.tar.gz
portage-336f02148b0a90e1933d7ca68a32f3bd5e9433d6.tar.bz2
portage-336f02148b0a90e1933d7ca68a32f3bd5e9433d6.zip
add_pkg_dep_string: fix reversed inst_pkgs order
This code was intended to iterate over packages in descending order, but match_pkgs() returns them in ascending order, so we need to reverse it.
-rw-r--r--pym/_emerge/depgraph.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 5314b5e50..b71d3648d 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -1488,7 +1488,8 @@ class depgraph(object):
mypriority = dep_priority.copy()
if not atom.blocker:
- inst_pkgs = [inst_pkg for inst_pkg in vardb.match_pkgs(atom)
+ inst_pkgs = [inst_pkg for inst_pkg in
+ reversed(vardb.match_pkgs(atom))
if not reinstall_atoms.findAtomForPackage(inst_pkg,
modified_use=self._pkg_use_enabled(inst_pkg))]
if inst_pkgs:
@@ -1574,7 +1575,8 @@ 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)
+ inst_pkgs = [inst_pkg for inst_pkg in
+ reversed(vardb.match_pkgs(virt_dep.atom))
if not reinstall_atoms.findAtomForPackage(inst_pkg,
modified_use=self._pkg_use_enabled(inst_pkg))]
if inst_pkgs:
@@ -1603,7 +1605,8 @@ class depgraph(object):
# This is a GLEP 37 virtual, so its deps are all runtime.
mypriority = self._priority(runtime=True)
if not atom.blocker:
- inst_pkgs = [inst_pkg for inst_pkg in vardb.match_pkgs(atom)
+ inst_pkgs = [inst_pkg for inst_pkg in
+ reversed(vardb.match_pkgs(atom))
if not reinstall_atoms.findAtomForPackage(inst_pkg,
modified_use=self._pkg_use_enabled(inst_pkg))]
if inst_pkgs: