aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-07-22 21:42:22 -0700
committerZac Medico <zmedico@gentoo.org>2013-07-22 21:42:22 -0700
commiteec775d6d1ee8b0d4a80ed0ef257a7b47dcf369b (patch)
tree7a65181c02eec01a19baf5be40dde346557784e1 /pym/portage/repository/config.py
parentMove hardcoded atoms of cvs, git and rsync to portage.const module and fix ca... (diff)
downloadportage-eec775d6d1ee8b0d4a80ed0ef257a7b47dcf369b.tar.gz
portage-eec775d6d1ee8b0d4a80ed0ef257a7b47dcf369b.tar.bz2
portage-eec775d6d1ee8b0d4a80ed0ef257a7b47dcf369b.zip
RepoConfigLoader: PORTDIR/repos.conf interaction
Diffstat (limited to 'pym/portage/repository/config.py')
-rw-r--r--pym/portage/repository/config.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 232e9cba0..e6d37a827 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -438,7 +438,9 @@ class RepoConfigLoader(object):
if repos_conf_opts is not None:
# Selectively copy only the attributes which
# repos.conf is allowed to override.
- for k in ('aliases', 'eclass_overrides', 'masters', 'priority'):
+ for k in ('aliases', 'eclass_overrides', 'masters',
+ 'priority', 'sync_cvs_repo', 'sync_type',
+ 'sync_uri'):
v = getattr(repos_conf_opts, k, None)
if v is not None:
setattr(repo, k, v)
@@ -480,7 +482,7 @@ class RepoConfigLoader(object):
return portdir
@staticmethod
- def _parse(paths, prepos, ignored_map, ignored_location_map, local_config):
+ def _parse(paths, prepos, ignored_map, ignored_location_map, local_config, portdir):
"""Parse files in paths to load config"""
parser = SafeConfigParser()
@@ -536,6 +538,14 @@ class RepoConfigLoader(object):
repo = RepoConfig(sname, optdict, local_config=local_config)
+ if repo.location and \
+ not exists_raise_eaccess(repo.location) and \
+ prepos['DEFAULT'].main_repo == repo.name and \
+ portdir and exists_raise_eaccess(portdir):
+ optdict['location'] = portdir
+ print optdict
+ repo = RepoConfig(sname, optdict, local_config=local_config)
+
if repo.name != sname and not portage._sync_disabled_warnings:
writemsg_level("!!! %s\n" % _("Section name '%s' set in repos.conf differs from name '%s' set inside repository") %
(sname, repo.name), level=logging.ERROR, noiselevel=-1)
@@ -593,7 +603,8 @@ class RepoConfigLoader(object):
try:
self._parse(paths, prepos, ignored_map,
- ignored_location_map, settings.local_config)
+ ignored_location_map, settings.local_config,
+ portdir)
except ConfigParserError as e:
writemsg(
_("!!! Error while reading repo config file: %s\n") % e,