commit: 41324890800db8a328d19b49b1b13748aa0a5355 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Sun Mar 23 00:46:25 2014 +0000 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> CommitDate: Mon Jun 16 15:36:56 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=41324890
repository/config: Changes for plugin-syc Use the new validate_config system --- pym/portage/repository/config.py | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 330e11b..44666f9 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -31,6 +31,7 @@ from portage import _unicode_decode from portage import _unicode_encode from portage import _encodings from portage import manifest +import portage.sync if sys.hexversion >= 0x3000000: # pylint: disable=W0622 @@ -550,25 +551,8 @@ class RepoConfigLoader(object): repo = RepoConfig(sname, optdict, local_config=local_config) - if repo.sync_type is not None and repo.sync_uri is None: - writemsg_level("!!! %s\n" % _("Repository '%s' has sync-type attribute, but is missing sync-uri attribute") % - sname, level=logging.ERROR, noiselevel=-1) - continue - - if repo.sync_uri is not None and repo.sync_type is None: - writemsg_level("!!! %s\n" % _("Repository '%s' has sync-uri attribute, but is missing sync-type attribute") % - sname, level=logging.ERROR, noiselevel=-1) - continue - - if repo.sync_type not in portage.sync.module_names + [None]: - writemsg_level("!!! %s\n" % _("Repository '%s' has sync-type attribute set to unsupported value: '%s'") % - (sname, repo.sync_type), level=logging.ERROR, noiselevel=-1) - continue - - if repo.sync_type == "cvs" and repo.sync_cvs_repo is None: - writemsg_level("!!! %s\n" % _("Repository '%s' has sync-type=cvs, but is missing sync-cvs-repo attribute") % - sname, level=logging.ERROR, noiselevel=-1) - continue + # Perform repos.conf sync variable validation + portage.sync.validate_config(repo) # For backward compatibility with locations set via PORTDIR and # PORTDIR_OVERLAY, delay validation of the location and repo.name