From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QSLRE-0006ng-Sm for garchives@archives.gentoo.org; Fri, 03 Jun 2011 03:52:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B696B1C005; Fri, 3 Jun 2011 03:52:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 89C171C005 for ; Fri, 3 Jun 2011 03:52:33 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 214701B4022 for ; Fri, 3 Jun 2011 03:52:33 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 7E61B80506 for ; Fri, 3 Jun 2011 03:52:32 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <336f02148b0a90e1933d7ca68a32f3bd5e9433d6.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/depgraph.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 336f02148b0a90e1933d7ca68a32f3bd5e9433d6 Date: Fri, 3 Jun 2011 03:52:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 73c6ef6b67ef57baf7679caecd52dbd3 commit: 336f02148b0a90e1933d7ca68a32f3bd5e9433d6 Author: Zac Medico gentoo org> AuthorDate: Fri Jun 3 03:47:09 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Jun 3 03:47:09 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D336f0214 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. --- pym/_emerge/depgraph.py | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 5314b5e..b71d364 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1488,7 +1488,8 @@ class depgraph(object): =20 mypriority =3D dep_priority.copy() if not atom.blocker: - inst_pkgs =3D [inst_pkg for inst_pkg in vardb.match_pkgs(atom) + inst_pkgs =3D [inst_pkg for inst_pkg in + reversed(vardb.match_pkgs(atom)) if not reinstall_atoms.findAtomForPackage(inst_pkg, modified_use=3Dself._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: =20 - inst_pkgs =3D [inst_pkg for inst_pkg in vardb.match_pkgs(virt_dep.at= om) + inst_pkgs =3D [inst_pkg for inst_pkg in + reversed(vardb.match_pkgs(virt_dep.atom)) if not reinstall_atoms.findAtomForPackage(inst_pkg, modified_use=3Dself._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 =3D self._priority(runtime=3DTrue) if not atom.blocker: - inst_pkgs =3D [inst_pkg for inst_pkg in vardb.match_pkgs(atom) + inst_pkgs =3D [inst_pkg for inst_pkg in + reversed(vardb.match_pkgs(atom)) if not reinstall_atoms.findAtomForPackage(inst_pkg, modified_use=3Dself._pkg_use_enabled(inst_pkg))] if inst_pkgs: