summaryrefslogtreecommitdiffstats
path: root/pym/portage/repository/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/repository/config.py')
-rw-r--r--pym/portage/repository/config.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 8b1e641b2..3cb550152 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -42,7 +42,8 @@ class RepoConfig(object):
"""Stores config of one repository"""
__slots__ = ['aliases', 'eclass_overrides', 'eclass_locations', 'location', 'user_location', 'masters', 'main_repo',
- 'missing_repo_name', 'name', 'priority', 'sync', 'format', 'sign_manifest', 'thin_manifest']
+ 'missing_repo_name', 'name', 'priority', 'sync', 'format', 'sign_manifest', 'thin_manifest',
+ 'allow_missing_manifest', 'create_manifest', 'disable_manifest']
def __init__(self, name, repo_opts):
"""Build a RepoConfig with options in repo_opts
@@ -113,9 +114,16 @@ class RepoConfig(object):
self.missing_repo_name = missing
self.sign_manifest = True
self.thin_manifest = False
+ self.allow_missing_manifest = False
+ self.create_manifest = True
+ self.disable_manifest = False
def load_manifest(self, *args, **kwds):
kwds['thin'] = self.thin_manifest
+ kwds['allow_missing'] = self.allow_missing_manifest
+ kwds['allow_create'] = self.create_manifest
+ if self.disable_manifest:
+ kwds['from_scratch'] = True
return manifest.Manifest(*args, **kwds)
def update(self, new_repo):
@@ -345,6 +353,11 @@ class RepoConfigLoader(object):
if layout_data.get('thin-manifests', '').lower() == 'true':
repo.thin_manifest = True
+ manifest_policy = layout_data.get('use-manifests', 'strict').lower()
+ repo.allow_missing_manifest = manifest_policy != 'strict'
+ repo.create_manifest = manifest_policy != 'false'
+ repo.disable_manifest = manifest_policy == 'false'
+
#Take aliases into account.
new_prepos = {}
for repo_name, repo in prepos.items():