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 1RIonr-0000qV-WA for garchives@archives.gentoo.org; Tue, 25 Oct 2011 21:45:00 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 500F621C10C; Tue, 25 Oct 2011 21:44:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0E9D621C106 for ; Tue, 25 Oct 2011 21:44:50 +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 80C071B4015 for ; Tue, 25 Oct 2011 21:44:50 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id A199380052 for ; Tue, 25 Oct 2011 21:44:49 +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/repository/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/repository/config.py X-VCS-Directories: pym/portage/repository/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: a34ac493d13ba5ad20b07f25f4e4f054e303eecb Date: Tue, 25 Oct 2011 21:44:49 +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: bf746db1c3525d1195f69cee9dfc2035 commit: a34ac493d13ba5ad20b07f25f4e4f054e303eecb Author: Brian Harring chromium org> AuthorDate: Tue Oct 25 05:40:16 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Oct 25 21:36:42 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Da34ac493 layout.conf: add profile-format awareness Note the portage-1-compat mode; this isn't settable externally, is purely an internal mode for tracking if a repository is in portage-1 compat mode, rather than explicit portage-1 mode. This compat mode will be removed once portage becomes strict. --- pym/portage/repository/config.py | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/co= nfig.py index fe2bd33..377ba47 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -48,7 +48,8 @@ class RepoConfig(object): 'eclass_overrides', 'eclass_locations', 'format', 'location', 'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name', 'name', 'priority', 'sign_manifest', 'sync', 'thin_manifest', - 'update_changelog', 'user_location') + 'update_changelog', 'user_location', 'portage1_profiles', + 'portage1_profiles_compat') =20 def __init__(self, name, repo_opts): """Build a RepoConfig with options in repo_opts @@ -128,6 +129,8 @@ class RepoConfig(object): self.manifest_hashes =3D None self.update_changelog =3D False self.cache_format =3D None + self.portage1_profiles =3D True + self.portage1_profiles_compat =3D False =20 def get_pregenerated_cache(self, auxdbkeys, readonly=3DTrue, force=3DFa= lse): format =3D self.cache_format @@ -380,6 +383,10 @@ class RepoConfigLoader(object): 'update-changelog'): setattr(repo, value.lower().replace("-", "_"), layout_data[value]) =20 + repo.portage1_profiles =3D any(x.startswith("portage-1") \ + for x in layout_data['profile-formats']) + repo.portage1_profiles_compat =3D layout_data['profile-formats'] =3D=3D= ('portage-1-compat',) + #Take aliases into account. new_prepos =3D {} for repo_name, repo in prepos.items(): @@ -639,4 +646,18 @@ def parse_layout_conf(repo_location, repo_name=3DNon= e): data['update-changelog'] =3D layout_data.get('update-changelog', 'false= ').lower() \ =3D=3D 'false' =20 + raw_formats =3D layout_data.get('profile-formats') + if raw_formats is None: + raw_formats =3D ('portage-1-compat',) + else: + raw_formats =3D set(raw_formats.split()) + unknown =3D raw_formats.difference(['pms', 'portage-1']) + warnings.warn((_("Repository named '%(repo_name)s' has unsupported " + "profiles in use ('profile-format' setting in '%(layout_filename)s;" + " please upgrade portage.") % + dict(repo_name=3Drepo_name, layout_filename=3Dlayout_filename)), + DeprecationWarning) + raw_formats =3D tuple(raw_formats.intersection(['pms', 'portage-1'])) + data['profile-formats'] =3D raw_formats + return data, layout_errors