From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A864D13877A for ; Mon, 16 Jun 2014 15:46:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A0EEDE0DA7; Mon, 16 Jun 2014 15:46:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BA800E0DA6 for ; Mon, 16 Jun 2014 15:46:31 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CED55340034 for ; Mon, 16 Jun 2014 15:46:30 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id E9124187F4 for ; Mon, 16 Jun 2014 15:46:28 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1402933016.41324890800db8a328d19b49b1b13748aa0a5355.dol-sen@gentoo> Subject: [gentoo-commits] proj/portage:plugin-sync 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: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 41324890800db8a328d19b49b1b13748aa0a5355 X-VCS-Branch: plugin-sync Date: Mon, 16 Jun 2014 15:46:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 886921db-8eb9-47b9-9926-de95a824f75c X-Archives-Hash: dcca4c93924aac2b9b4acc80059ddce4 commit: 41324890800db8a328d19b49b1b13748aa0a5355 Author: Brian Dolbec gentoo org> AuthorDate: Sun Mar 23 00:46:25 2014 +0000 Commit: Brian Dolbec gmail 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