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 <gentoo-commits+bounces-344420-garchives=archives.gentoo.org@lists.gentoo.org>)
	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 <gentoo-commits@lists.gentoo.org>; 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 <gentoo-commits@lists.gentoo.org>; 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 <gentoo-commits@lists.gentoo.org>; Wed, 11 May 2011 04:07:47 +0000 (UTC)
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" <zmedico@gentoo.org>
Message-ID: <bd78d51c715b711a5d496d68bb48421b777bf609.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: bd78d51c715b711a5d496d68bb48421b777bf609
Date: Wed, 11 May 2011 04:07:47 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 
X-Archives-Hash: 0b974e2c67c4505c7dbddadcc4687996

commit:     bd78d51c715b711a5d496d68bb48421b777bf609
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed May 11 04:03:02 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> 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