aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-12-05 23:40:13 +0100
committerMichał Górny <mgorny@gentoo.org>2014-12-07 23:57:07 +0100
commit7909ed55ba45b8a94f4a29148e43953eb58aa184 (patch)
tree8f95efaf3f99b0d344e782a0fb142d73e1050e3b /pym/portage/repository/config.py
parentsync: allow overriding sync-umask for the repository (diff)
downloadportage-7909ed55ba45b8a94f4a29148e43953eb58aa184.tar.gz
portage-7909ed55ba45b8a94f4a29148e43953eb58aa184.tar.bz2
portage-7909ed55ba45b8a94f4a29148e43953eb58aa184.zip
sync: allow overriding sync-user for the repository
Diffstat (limited to 'pym/portage/repository/config.py')
-rw-r--r--pym/portage/repository/config.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 678cc6853..f45684b89 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -85,7 +85,7 @@ class RepoConfig(object):
'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name',
'name', 'portage1_profiles', 'portage1_profiles_compat', 'priority',
'profile_formats', 'sign_commit', 'sign_manifest', 'sync_cvs_repo',
- 'sync_type', 'sync_umask', 'sync_uri', 'thin_manifest',
+ 'sync_type', 'sync_umask', 'sync_uri', 'sync_user', 'thin_manifest',
'update_changelog', 'user_location', '_eapis_banned',
'_eapis_deprecated', '_masters_orig')
@@ -165,6 +165,11 @@ class RepoConfig(object):
sync_uri = sync_uri.strip()
self.sync_uri = sync_uri or None
+ sync_user = repo_opts.get('sync-user')
+ if sync_user is not None:
+ sync_user = sync_user.strip()
+ self.sync_user = sync_user or None
+
auto_sync = repo_opts.get('auto-sync')
if auto_sync is not None:
auto_sync = auto_sync.strip().lower()
@@ -385,6 +390,8 @@ class RepoConfig(object):
repo_msg.append(indent + "sync-umask: " + self.sync_umask)
if self.sync_uri:
repo_msg.append(indent + "sync-uri: " + self.sync_uri)
+ if self.sync_user:
+ repo_msg.append(indent + "sync-user: " + self.sync_user)
if self.masters:
repo_msg.append(indent + "masters: " + " ".join(master.name for master in self.masters))
if self.priority is not None:
@@ -472,7 +479,7 @@ class RepoConfigLoader(object):
# repos.conf is allowed to override.
for k in ('aliases', 'auto_sync', 'eclass_overrides',
'force', 'masters', 'priority', 'sync_cvs_repo',
- 'sync_type', 'sync_umask', 'sync_uri',
+ 'sync_type', 'sync_umask', 'sync_uri', 'sync_user',
):
v = getattr(repos_conf_opts, k, None)
if v is not None:
@@ -923,7 +930,7 @@ class RepoConfigLoader(object):
def config_string(self):
str_or_int_keys = ("auto_sync", "format", "location",
"main_repo", "priority", "sync_cvs_repo",
- "sync_type", "sync_umask", "sync_uri")
+ "sync_type", "sync_umask", "sync_uri", 'sync_user')
str_tuple_keys = ("aliases", "eclass_overrides", "force")
repo_config_tuple_keys = ("masters",)
keys = str_or_int_keys + str_tuple_keys + repo_config_tuple_keys