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 1QJJuP-0000G4-PN for garchives@archives.gentoo.org; Mon, 09 May 2011 06:25:33 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 308391C065; Mon, 9 May 2011 06:25:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id EB1DC1C065 for ; Mon, 9 May 2011 06:25:25 +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 47D4B1B4028 for ; Mon, 9 May 2011 06:25:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 5D4BE80504 for ; Mon, 9 May 2011 06:25:24 +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: <16f3856ff76aca1ee668a464aefa4102b3cccb22.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/cpv_expand.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 16f3856ff76aca1ee668a464aefa4102b3cccb22 Date: Mon, 9 May 2011 06:25:24 +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: f746880d35c5f2150584e57170a99bb9 commit: 16f3856ff76aca1ee668a464aefa4102b3cccb22 Author: Zac Medico gentoo org> AuthorDate: Mon May 9 06:23:07 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon May 9 06:23:07 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D16f3856f cpv_expand: populate old-style virts on demand If old-style virtuals code is triggered here and we are given a vartree, use it to avoid creating a temporary instance. --- pym/portage/dbapi/cpv_expand.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/pym/portage/dbapi/cpv_expand.py b/pym/portage/dbapi/cpv_expa= nd.py index 26f9948..b77c283 100644 --- a/pym/portage/dbapi/cpv_expand.py +++ b/pym/portage/dbapi/cpv_expand.py @@ -28,6 +28,8 @@ def cpv_expand(mycpv, mydb=3DNone, use_cache=3D1, setti= ngs=3DNone): mykey=3Dmycpv if hasattr(mydb, "cp_list") and \ not mydb.cp_list(mykey, use_cache=3Duse_cache): + if hasattr(mydb, "vartree"): + settings._populate_treeVirtuals_if_needed(mydb.vartree) virts =3D settings.getvirtuals().get(mykey) if virts: mykey_orig =3D mykey @@ -76,6 +78,8 @@ def cpv_expand(mycpv, mydb=3DNone, use_cache=3D1, setti= ngs=3DNone): mykey=3Dmatches[0] =20 if not mykey and not isinstance(mydb, list): + if hasattr(mydb, "vartree"): + settings._populate_treeVirtuals_if_needed(mydb.vartree) virts_p =3D settings.get_virts_p().get(myp) if virts_p: mykey =3D virts_p[0]