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 1QRkZf-00034h-Lq for garchives@archives.gentoo.org; Wed, 01 Jun 2011 12:31:00 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D03C81C031; Wed, 1 Jun 2011 12:30:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 925861C031 for ; Wed, 1 Jun 2011 12:30:17 +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 1ADCA1B4029 for ; Wed, 1 Jun 2011 12:30:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 73B4280506 for ; Wed, 1 Jun 2011 12:30:16 +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: <3fc667d086c6fad218a86ffc0e9cc6e5f856ece2.mgorny@gentoo> Subject: [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/ X-VCS-Repository: proj/pms-test-suite X-VCS-Files: PMSTestSuite/repository/__init__.py X-VCS-Directories: PMSTestSuite/repository/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 3fc667d086c6fad218a86ffc0e9cc6e5f856ece2 Date: Wed, 1 Jun 2011 12:30:16 +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: 61ba1801de0a434d4547b94a364d7c0f commit: 3fc667d086c6fad218a86ffc0e9cc6e5f856ece2 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Wed Jun 1 11:53:22 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Wed Jun 1 11:53:22 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3D3fc667d0 Require added ebuilds to match supported categories. --- PMSTestSuite/repository/__init__.py | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repositor= y/__init__.py index 63af3dc..4496361 100644 --- a/PMSTestSuite/repository/__init__.py +++ b/PMSTestSuite/repository/__init__.py @@ -43,6 +43,14 @@ class EbuildRepository(object): def write_files(self, files): """ Write files from files dict to the repository. """ for fn, c in files.items(): + head =3D fn + while head: + head, tail =3D os.path.split(head) + if tail in ('eclass', 'profiles'): + pass + elif tail not in self.categories: + self.add_category(tail) + fp =3D os.path.join(self.path, fn) if not os.path.exists(os.path.dirname(fp)): os.makedirs(os.path.dirname(fp)) @@ -54,6 +62,10 @@ class EbuildRepository(object): """ Remanifest files from dict using . """ dirs =3D frozenset([os.path.join(self.path, os.path.dirname(f)) for f = in files]) pm.remanifest(dirs) + + def add_category(self, catname): + """ Add category to profiles/categories. """ + raise ValueError("The repository doesn't support %s category." % catna= me) =09 class NewEbuildRepository(EbuildRepository): """