commit:     ddd73838459d7fac423adc1082665df3e3de6a2a
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 30 09:42:44 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon Jun 16 22:43:11 2014 +0000
URL:        
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ddd73838

portage/repository/config.py: Add auto_sync attribute

Make the auto_sync variable lowercase
cnf/repos.conf: Add new auto-sync variable

---
 cnf/repos.conf                   |  1 +
 pym/portage/repository/config.py | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/cnf/repos.conf b/cnf/repos.conf
index 8c657da..1ca98ca 100644
--- a/cnf/repos.conf
+++ b/cnf/repos.conf
@@ -5,3 +5,4 @@ main-repo = gentoo
 location = /usr/portage
 sync-type = rsync
 sync-uri = rsync://rsync.gentoo.org/gentoo-portage
+auto-sync = yes

diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 44666f9..bb54b57 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -79,8 +79,8 @@ class RepoConfig(object):
        """Stores config of one repository"""
 
        __slots__ = ('aliases', 'allow_missing_manifest', 
'allow_provide_virtual',
-               'cache_formats', 'create_manifest', 'disable_manifest', 'eapi',
-               'eclass_db', 'eclass_locations', 'eclass_overrides',
+               'auto_sync', 'cache_formats', 'create_manifest', 
'disable_manifest',
+               'eapi', 'eclass_db', 'eclass_locations', 'eclass_overrides',
                'find_invalid_path_char', 'force', 'format', 'local_config', 
'location',
                'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name',
                'name', 'portage1_profiles', 'portage1_profiles_compat', 
'priority',
@@ -159,6 +159,11 @@ class RepoConfig(object):
                        sync_uri = sync_uri.strip()
                self.sync_uri = sync_uri or None
 
+               auto_sync = repo_opts.get('auto-sync')
+               if auto_sync is not None:
+                       auto_sync = auto_sync.strip().lower()
+               self.auto_sync = auto_sync
+
                # Not implemented.
                format = repo_opts.get('format')
                if format is not None:
@@ -552,7 +557,7 @@ class RepoConfigLoader(object):
                        repo = RepoConfig(sname, optdict, 
local_config=local_config)
 
                        # Perform repos.conf sync variable validation
-                       portage.sync.validate_config(repo)
+                       portage.sync.validate_config(repo, logging)
 
                        # For backward compatibility with locations set via 
PORTDIR and
                        # PORTDIR_OVERLAY, delay validation of the location and 
repo.name

Reply via email to