1 |
commit: 0f75370f9b9f6053a125cbac6e391673f3b3d768 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 30 09:42:44 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=0f75370f |
7 |
|
8 |
portage/repository/config.py: Add auto_sync attribute |
9 |
|
10 |
Make the auto_sync variable lowercase |
11 |
cnf/repos.conf: Add new auto-sync variable |
12 |
|
13 |
--- |
14 |
cnf/repos.conf | 1 + |
15 |
pym/portage/repository/config.py | 11 ++++++++--- |
16 |
2 files changed, 9 insertions(+), 3 deletions(-) |
17 |
|
18 |
diff --git a/cnf/repos.conf b/cnf/repos.conf |
19 |
index 8c657da..1ca98ca 100644 |
20 |
--- a/cnf/repos.conf |
21 |
+++ b/cnf/repos.conf |
22 |
@@ -5,3 +5,4 @@ main-repo = gentoo |
23 |
location = /usr/portage |
24 |
sync-type = rsync |
25 |
sync-uri = rsync://rsync.gentoo.org/gentoo-portage |
26 |
+auto-sync = yes |
27 |
|
28 |
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py |
29 |
index 44666f9..9912760 100644 |
30 |
--- a/pym/portage/repository/config.py |
31 |
+++ b/pym/portage/repository/config.py |
32 |
@@ -79,8 +79,8 @@ class RepoConfig(object): |
33 |
"""Stores config of one repository""" |
34 |
|
35 |
__slots__ = ('aliases', 'allow_missing_manifest', 'allow_provide_virtual', |
36 |
- 'cache_formats', 'create_manifest', 'disable_manifest', 'eapi', |
37 |
- 'eclass_db', 'eclass_locations', 'eclass_overrides', |
38 |
+ 'auto_sync', 'cache_formats', 'create_manifest', 'disable_manifest', |
39 |
+ 'eapi', 'eclass_db', 'eclass_locations', 'eclass_overrides', |
40 |
'find_invalid_path_char', 'force', 'format', 'local_config', 'location', |
41 |
'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name', |
42 |
'name', 'portage1_profiles', 'portage1_profiles_compat', 'priority', |
43 |
@@ -159,6 +159,11 @@ class RepoConfig(object): |
44 |
sync_uri = sync_uri.strip() |
45 |
self.sync_uri = sync_uri or None |
46 |
|
47 |
+ auto_sync = repo_opts.get('auto-sync') |
48 |
+ if auto_sync is not None: |
49 |
+ auto_sync = auto_sync.strip().lower() |
50 |
+ self.auto_sync = auto_sync or None |
51 |
+ |
52 |
# Not implemented. |
53 |
format = repo_opts.get('format') |
54 |
if format is not None: |
55 |
@@ -552,7 +557,7 @@ class RepoConfigLoader(object): |
56 |
repo = RepoConfig(sname, optdict, local_config=local_config) |
57 |
|
58 |
# Perform repos.conf sync variable validation |
59 |
- portage.sync.validate_config(repo) |
60 |
+ portage.sync.validate_config(repo, logging) |
61 |
|
62 |
# For backward compatibility with locations set via PORTDIR and |
63 |
# PORTDIR_OVERLAY, delay validation of the location and repo.name |