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 1QZ81j-0000VH-R5 for garchives@archives.gentoo.org; Tue, 21 Jun 2011 20:58:28 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 28D731C093; Tue, 21 Jun 2011 20:58:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E7ABC1C093 for ; Tue, 21 Jun 2011 20:58:03 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 71F0C1B4020 for ; Tue, 21 Jun 2011 20:58:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 76A7180048 for ; Tue, 21 Jun 2011 20:58:02 +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: Subject: [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/pm/ X-VCS-Repository: proj/pms-test-suite X-VCS-Files: PMSTestSuite/pm/paludispm.py X-VCS-Directories: PMSTestSuite/pm/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: b455311d85e4062d5af7396f6211d66b60726017 Date: Tue, 21 Jun 2011 20:58:02 +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: 6e6606993d647f8875e9d59c4c27190b commit: b455311d85e4062d5af7396f6211d66b60726017 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Tue Jun 21 20:29:33 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Tue Jun 21 20:29:33 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3Db455311d paludis: get repository path using cave. --- PMSTestSuite/pm/paludispm.py | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/PMSTestSuite/pm/paludispm.py b/PMSTestSuite/pm/paludispm.py index 619e77b..7e71f15 100644 --- a/PMSTestSuite/pm/paludispm.py +++ b/PMSTestSuite/pm/paludispm.py @@ -11,6 +11,7 @@ import os, os.path, subprocess =20 from PMSTestSuite.repository import EbuildRepository +from PMSTestSuite.pm import PackageManager from PMSTestSuite.pm.portagepm import PortagePM =20 class PaludisPM(PortagePM): @@ -25,7 +26,7 @@ class PaludisPM(PortagePM): cave_path =3D '/usr/bin/cave' common_cave_opts =3D ['--lazy', '--preserve-world', '--execute'] =20 - class VDB(PortagePM.VDB): + class VDB(PackageManager.VDB): def __contains__(self, cpv): p =3D subprocess.Popen(['cave', '--log-level', 'silent', 'has-version', '=3D%s' % cpv]) @@ -52,3 +53,13 @@ class PaludisPM(PortagePM): =20 def append_repository(self, repo): raise NotImplementedError('PaludisPM does not support adding repositor= ies yet.') + + def get_repository(self, name): + s =3D subprocess.Popen(['cave', '--log-level', 'silent', + 'print-repository-metadata', name, + '--raw-name', 'location', + '--format', '%v'], stdout=3Dsubprocess.PIPE) + r =3D s.communicate()[0] + if not r or s.returncode !=3D 0: + raise KeyError('Repository %s not found.' % name) + return EbuildRepository(r)