Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/repository/
Date: Fri, 02 May 2014 23:13:44
Message-Id: 1399072156.40aa9f02358edffd6c80d8ab3dd97bfef1f44d25.dol-sen@gentoo
1 commit: 40aa9f02358edffd6c80d8ab3dd97bfef1f44d25
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 23 00:46:25 2014 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Fri May 2 23:09:16 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=40aa9f02
7
8 repository/config: Changes for plugin-syc
9
10 Use the new validate_config system
11
12 ---
13 pym/portage/repository/config.py | 22 +++-------------------
14 1 file changed, 3 insertions(+), 19 deletions(-)
15
16 diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
17 index 330e11b..44666f9 100644
18 --- a/pym/portage/repository/config.py
19 +++ b/pym/portage/repository/config.py
20 @@ -31,6 +31,7 @@ from portage import _unicode_decode
21 from portage import _unicode_encode
22 from portage import _encodings
23 from portage import manifest
24 +import portage.sync
25
26 if sys.hexversion >= 0x3000000:
27 # pylint: disable=W0622
28 @@ -550,25 +551,8 @@ class RepoConfigLoader(object):
29
30 repo = RepoConfig(sname, optdict, local_config=local_config)
31
32 - if repo.sync_type is not None and repo.sync_uri is None:
33 - writemsg_level("!!! %s\n" % _("Repository '%s' has sync-type attribute, but is missing sync-uri attribute") %
34 - sname, level=logging.ERROR, noiselevel=-1)
35 - continue
36 -
37 - if repo.sync_uri is not None and repo.sync_type is None:
38 - writemsg_level("!!! %s\n" % _("Repository '%s' has sync-uri attribute, but is missing sync-type attribute") %
39 - sname, level=logging.ERROR, noiselevel=-1)
40 - continue
41 -
42 - if repo.sync_type not in portage.sync.module_names + [None]:
43 - writemsg_level("!!! %s\n" % _("Repository '%s' has sync-type attribute set to unsupported value: '%s'") %
44 - (sname, repo.sync_type), level=logging.ERROR, noiselevel=-1)
45 - continue
46 -
47 - if repo.sync_type == "cvs" and repo.sync_cvs_repo is None:
48 - writemsg_level("!!! %s\n" % _("Repository '%s' has sync-type=cvs, but is missing sync-cvs-repo attribute") %
49 - sname, level=logging.ERROR, noiselevel=-1)
50 - continue
51 + # Perform repos.conf sync variable validation
52 + portage.sync.validate_config(repo)
53
54 # For backward compatibility with locations set via PORTDIR and
55 # PORTDIR_OVERLAY, delay validation of the location and repo.name