aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Harring <ferringb@chromium.org>2011-09-23 16:43:28 -0700
committerZac Medico <zmedico@gentoo.org>2011-09-27 23:31:54 -0700
commitf3101b3adce6731790f80f83fafece54b7bd8a63 (patch)
tree4bc1d857c88c74386628eed2e84be48c2d3586b3 /pym/portage/repository
parentdepgraph: handle unicode exception for bug 384749 (diff)
downloadportage-f3101b3adce6731790f80f83fafece54b7bd8a63.tar.gz
portage-f3101b3adce6731790f80f83fafece54b7bd8a63.tar.bz2
portage-f3101b3adce6731790f80f83fafece54b7bd8a63.zip
manifest: controllable per repo
This adds three states to layout.conf key use-manifest; false, true, and strict. false means "don't use manifests at all" true means "use and generate manifests, but allow them to be missing" strict means "manifests must be used everywhere in this repo" BUG=chromium-os:11308 TEST=repoman manifest usage.
Diffstat (limited to 'pym/portage/repository')
-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():