aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-12-05 23:14:11 +0100
committerMichał Górny <mgorny@gentoo.org>2014-12-07 23:57:07 +0100
commit8f57f47d6e7ac110491af520f674a51e0cc564b0 (patch)
tree3585e99e682ecc5924aa0e0c2e2e369ed8a596a0 /pym/portage/repository/config.py
parentPrefer GNU ar when unpacking .deb packages. (diff)
downloadportage-8f57f47d6e7ac110491af520f674a51e0cc564b0.tar.gz
portage-8f57f47d6e7ac110491af520f674a51e0cc564b0.tar.bz2
portage-8f57f47d6e7ac110491af520f674a51e0cc564b0.zip
sync: allow overriding sync-umask for the repository
Diffstat (limited to 'pym/portage/repository/config.py')
-rw-r--r--pym/portage/repository/config.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index d37ce6a28..678cc6853 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -85,8 +85,9 @@ 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_uri', 'thin_manifest', 'update_changelog',
- 'user_location', '_eapis_banned', '_eapis_deprecated', '_masters_orig')
+ 'sync_type', 'sync_umask', 'sync_uri', 'thin_manifest',
+ 'update_changelog', 'user_location', '_eapis_banned',
+ '_eapis_deprecated', '_masters_orig')
def __init__(self, name, repo_opts, local_config=True):
"""Build a RepoConfig with options in repo_opts
@@ -154,6 +155,11 @@ class RepoConfig(object):
sync_type = sync_type.strip()
self.sync_type = sync_type or None
+ sync_umask = repo_opts.get('sync-umask')
+ if sync_umask is not None:
+ sync_umask = sync_umask.strip()
+ self.sync_umask = sync_umask or None
+
sync_uri = repo_opts.get('sync-uri')
if sync_uri is not None:
sync_uri = sync_uri.strip()
@@ -375,6 +381,8 @@ class RepoConfig(object):
repo_msg.append(indent + "sync-cvs-repo: " + self.sync_cvs_repo)
if self.sync_type:
repo_msg.append(indent + "sync-type: " + self.sync_type)
+ if self.sync_umask:
+ repo_msg.append(indent + "sync-umask: " + self.sync_umask)
if self.sync_uri:
repo_msg.append(indent + "sync-uri: " + self.sync_uri)
if self.masters:
@@ -464,7 +472,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_uri',
+ 'sync_type', 'sync_umask', 'sync_uri',
):
v = getattr(repos_conf_opts, k, None)
if v is not None:
@@ -915,7 +923,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_uri")
+ "sync_type", "sync_umask", "sync_uri")
str_tuple_keys = ("aliases", "eclass_overrides", "force")
repo_config_tuple_keys = ("masters",)
keys = str_or_int_keys + str_tuple_keys + repo_config_tuple_keys