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 1QJXC0-0007gZ-F8 for garchives@archives.gentoo.org; Mon, 09 May 2011 20:36:36 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7DB0EE0330; Mon, 9 May 2011 20:36:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 47484E0330 for ; Mon, 9 May 2011 20:36:28 +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 AE5AD1BC013 for ; Mon, 9 May 2011 20:36:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 0DCB080504 for ; Mon, 9 May 2011 20:36:27 +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/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: ff65607c5dbd5f320dfbc4e77e97d7bfd69ab467 Date: Mon, 9 May 2011 20:36:27 +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: d907c6a9616a98f0f630306632da5b25 commit: ff65607c5dbd5f320dfbc4e77e97d7bfd69ab467 Author: Zac Medico gentoo org> AuthorDate: Mon May 9 20:36:22 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon May 9 20:36:22 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dff65607c cpv_expand: avoid old-style virtuals more --- pym/portage/dbapi/cpv_expand.py | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/pym/portage/dbapi/cpv_expand.py b/pym/portage/dbapi/cpv_expa= nd.py index b77c283..7077b1f 100644 --- a/pym/portage/dbapi/cpv_expand.py +++ b/pym/portage/dbapi/cpv_expand.py @@ -26,7 +26,14 @@ def cpv_expand(mycpv, mydb=3DNone, use_cache=3D1, sett= ings=3DNone): mykey=3Dmyslash[0]+"/"+mysplit[0] else: mykey=3Dmycpv - if hasattr(mydb, "cp_list") and \ + + # Since Gentoo stopped using old-style virtuals in + # 2011, typically it's possible to avoid getvirtuals() + # calls entirely. Therefore, only call getvirtuals() + # if the atom category is "virtual" and cp_list() + # returns nothing. + if mykey.startswith("virtual/") and \ + 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)