From: Zac Medico Date: Thu, 27 Oct 2011 17:10:53 +0000 (-0700) Subject: parse_layout_conf: fix profile-formats warning X-Git-Tag: v2.2.0_alpha72~58 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=03c4ecb1f49415b886d52bcaad773c9853343b55;p=portage.git parse_layout_conf: fix profile-formats warning --- diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 07969ccb4..9bffd7097 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -676,11 +676,13 @@ def parse_layout_conf(repo_location, repo_name=None): else: raw_formats = set(raw_formats.split()) unknown = 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=repo_name, layout_filename=layout_filename)), - DeprecationWarning) + if unknown: + warnings.warn((_("Repository named '%(repo_name)s' has unsupported " + "profiles in use ('profile-format = %(unknown_fmts)s' setting in " + "'%(layout_filename)s; please upgrade portage.") % + dict(repo_name=repo_name, layout_filename=layout_filename, + unknown_fmts=" ".join(unknown))), + DeprecationWarning) raw_formats = tuple(raw_formats.intersection(['pms', 'portage-1'])) data['profile-formats'] = raw_formats diff --git a/pym/portage/tests/ebuild/test_config.py b/pym/portage/tests/ebuild/test_config.py index ea641925e..570cb2bc9 100644 --- a/pym/portage/tests/ebuild/test_config.py +++ b/pym/portage/tests/ebuild/test_config.py @@ -217,6 +217,7 @@ class ConfigTestCase(TestCase): "new_repo": { "layout.conf": ( + "profile-formats = pms", "thin-manifests = true", "manifest-hashes = RMD160 SHA1 SHA256 SHA512 WHIRLPOOL", ),