From: Zac Medico Date: Fri, 3 Jun 2011 03:47:09 +0000 (-0700) Subject: add_pkg_dep_string: fix reversed inst_pkgs order X-Git-Tag: v2.2.0_alpha38~38 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=336f02148b0a90e1933d7ca68a32f3bd5e9433d6;p=portage.git 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. --- 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: