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 1QK0iK-0000zG-P8 for garchives@archives.gentoo.org; Wed, 11 May 2011 04:07:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3CD771C07B; Wed, 11 May 2011 04:07:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 105491C07B for ; Wed, 11 May 2011 04:07:48 +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 8AA771B400C for ; Wed, 11 May 2011 04:07:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id DDCD880504 for ; Wed, 11 May 2011 04:07:47 +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: 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: bd78d51c715b711a5d496d68bb48421b777bf609 Date: Wed, 11 May 2011 04:07:47 +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: 0b974e2c67c4505c7dbddadcc4687996 commit: bd78d51c715b711a5d496d68bb48421b777bf609 Author: Zac Medico gentoo org> AuthorDate: Wed May 11 04:03:02 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed May 11 04:03:02 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dbd78d51c dep_check_composite_db: return early from cp_list Since this implementation is only intended to check for existence of new-style virtuals, it's a waste of time to return more than one cpv. --- pym/_emerge/depgraph.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 6c79819..b8089ae 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -6051,7 +6051,9 @@ class _dep_check_composite_db(dbapi): def cp_list(self, cp): """ Emulate cp_list just so it can be used to check for existence - of new-style virtuals. + of new-style virtuals. Since it's a waste of time to return + more than one cpv for this use case, a maximum of one cpv will + be returned. """ if isinstance(cp, Atom): atom =3D cp @@ -6062,6 +6064,7 @@ class _dep_check_composite_db(dbapi): self._depgraph._frozen_config.roots[self._root], atom): if pkg.cp =3D=3D cp: ret.append(pkg.cpv) + break =20 return ret =20