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 1QKOPJ-0003Vj-A4 for garchives@archives.gentoo.org; Thu, 12 May 2011 05:25:53 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6BCE71C081; Thu, 12 May 2011 05:24:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 3DD891C06D for ; Thu, 12 May 2011 05:24:51 +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 BA1E61B40A8 for ; Thu, 12 May 2011 05:24:50 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 0725680506 for ; Thu, 12 May 2011 05:24:50 +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: <97accf02abc066fe72c33778765b2b097464bba6.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:2.1.9 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: 97accf02abc066fe72c33778765b2b097464bba6 Date: Thu, 12 May 2011 05:24:50 +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: 4e3509870490b6144c3a81bed885763b commit: 97accf02abc066fe72c33778765b2b097464bba6 Author: Zac Medico gentoo org> AuthorDate: Mon May 9 06:23:07 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu May 12 05:09:19 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D97accf02 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]