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 1QJZ1w-00031j-AQ for garchives@archives.gentoo.org; Mon, 09 May 2011 22:34:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 74BBB1C079; Mon, 9 May 2011 22:34:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 447151C079 for ; Mon, 9 May 2011 22:34:13 +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 C042F1BC01B for ; Mon, 9 May 2011 22:34:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 3F96480506 for ; Mon, 9 May 2011 22:34:12 +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: <2e530322dad9747cd85e7a1d9cf5326a99af4979.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: 2e530322dad9747cd85e7a1d9cf5326a99af4979 Date: Mon, 9 May 2011 22:34:12 +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: 8051de430f1b74f6aa7d930fe3b7f00b commit: 2e530322dad9747cd85e7a1d9cf5326a99af4979 Author: Zac Medico gentoo org> AuthorDate: Mon May 9 22:34:06 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon May 9 22:34:06 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D2e530322 dep_check_composite_db: implement cp_list This is used by dep_check since commit 6f9ee9c508c1506cdf8eb0dc46796dbe30f268db. --- pym/_emerge/depgraph.py | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 83d6e9b..80a7d6c 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -6048,6 +6048,23 @@ class _dep_check_composite_db(dbapi): self._match_cache.clear() self._cpv_pkg_map.clear() =20 + def cp_list(self, cp): + """ + Emulate cp_list just so it can be used to check for existence + of new-style virtuals. + """ + if isinstance(cp, Atom): + atom =3D cp + else: + atom =3D Atom(cp) + ret =3D [] + for pkg in self._depgraph._iter_match_pkgs_any( + self._depgraph._frozen_config.roots[self._root], atom): + if pkg.cp =3D=3D cp: + ret.append(pkg.cpv) + + return ret + def match(self, atom): ret =3D self._match_cache.get(atom) if ret is not None: