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 1R7BwC-00054p-Rp for garchives@archives.gentoo.org; Fri, 23 Sep 2011 20:01:32 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 12B3521C032; Fri, 23 Sep 2011 20:01:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D436D21C032 for ; Fri, 23 Sep 2011 20:01:17 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5FED21B4004 for ; Fri, 23 Sep 2011 20:01:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id B3AD180042 for ; Fri, 23 Sep 2011 20:01:16 +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: <8be9e967be8e0c038245f55ec927da5b1caa5d54.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/porttree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 8be9e967be8e0c038245f55ec927da5b1caa5d54 Date: Fri, 23 Sep 2011 20:01:16 +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: 7264bd0e321b4c86e06ac52f17fcaf3c commit: 8be9e967be8e0c038245f55ec927da5b1caa5d54 Author: Zac Medico gentoo org> AuthorDate: Fri Sep 23 20:00:57 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Sep 23 20:00:57 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D8be9e967 portdbapi.xmatch: fix minimum-all for multi-repo --- pym/portage/dbapi/porttree.py | 23 ++++++++++++++++------- 1 files changed, 16 insertions(+), 7 deletions(-) diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.p= y index 1354124..d42e41e 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -895,15 +895,24 @@ class portdbapi(dbapi): # Find the minimum matching version. This is optimized to # minimize the number of metadata accesses (improves performance # especially in cases where metadata needs to be generated). + myval =3D "" if mydep =3D=3D mykey: - cpv_iter =3D iter(self.cp_list(mykey, mytree=3Dmytree)) + for myval in self.cp_list(mykey, mytree=3Dmytree): + break + elif mydep.repo is not None or len(self.porttrees) =3D=3D 1: + for myval in self._iter_match(mydep, + self.cp_list(mykey, mytree=3Dmytree)): + break else: - cpv_iter =3D self._iter_match(mydep, - self.cp_list(mykey, mytree=3Dmytree)) - try: - myval =3D next(cpv_iter) - except StopIteration: - myval =3D "" + # We iterate over self.porttrees, since it's common to + # tweak this attribute in order to adjust match behavior. + for tree in self.porttrees: + repo =3D self.repositories.get_name_for_location(tree) + for myval in self._iter_match(mydep.with_repo(repo), + self.cp_list(mykey, mytree=3Dtree)): + break + if myval: + break =20 elif level in ("minimum-visible", "bestmatch-visible"): # Find the minimum matching visible version. This is optimized to