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 1RQ4Ky-0001rG-B3 for garchives@archives.gentoo.org; Mon, 14 Nov 2011 21:45:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B1BDE21C04C; Mon, 14 Nov 2011 21:44:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7A3E421C04C for ; Mon, 14 Nov 2011 21:44:58 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EE9861B401C for ; Mon, 14 Nov 2011 21:44:57 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 662E180048 for ; Mon, 14 Nov 2011 21:44:57 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <96b56b5336cff67e48d94125d47471920b3742c4.mgorny@gentoo> Subject: [gentoo-commits] proj/gentoopm:master commit in: gentoopm/pkgcorepm/ X-VCS-Repository: proj/gentoopm X-VCS-Files: gentoopm/pkgcorepm/repo.py X-VCS-Directories: gentoopm/pkgcorepm/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 96b56b5336cff67e48d94125d47471920b3742c4 Date: Mon, 14 Nov 2011 21:44:57 +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: b1a1d3b6-4eab-4035-bfe3-79071088571f X-Archives-Hash: d16a660bd3fe8efc2c768e44c77d2a17 commit: 96b56b5336cff67e48d94125d47471920b3742c4 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Mon Nov 14 21:40:31 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Mon Nov 14 21:40:31 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoopm.git;= a=3Dcommit;h=3D96b56b53 Support pkgcore-0.7.5+. --- gentoopm/pkgcorepm/repo.py | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/gentoopm/pkgcorepm/repo.py b/gentoopm/pkgcorepm/repo.py index b082420..13aa1c0 100644 --- a/gentoopm/pkgcorepm/repo.py +++ b/gentoopm/pkgcorepm/repo.py @@ -6,6 +6,7 @@ from abc import abstractproperty =20 import pkgcore.restrictions.boolean as br +from pkgcore.ebuild.repository import UnconfiguredTree =20 from ..basepm.repo import PMRepository, PMRepositoryDict, \ PMEbuildRepository @@ -17,7 +18,16 @@ from .filter import transform_filters =20 class PkgCoreRepoDict(PMRepositoryDict): def __iter__(self): - for i, r in enumerate(self._domain.named_repos['repo-stack'].trees): + try: + trees =3D self._domain.named_repos['repo-stack'].trees + except KeyError: # pkgcore-0.7.5+ + def _match_ebuild_repos(x): + return isinstance(x, UnconfiguredTree) + + trees =3D filter(_match_ebuild_repos, + self._domain.named_repos.values()) + + for i, r in enumerate(trees): yield PkgCoreEbuildRepo(r, self._domain, i) =20 def __init__(self, domain):