From: Zac Medico Date: Tue, 23 Jul 2013 04:42:22 +0000 (-0700) Subject: RepoConfigLoader: PORTDIR/repos.conf interaction X-Git-Tag: v2.2.0_alpha189~28 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=eec775d6d1ee8b0d4a80ed0ef257a7b47dcf369b;p=portage.git RepoConfigLoader: PORTDIR/repos.conf interaction --- 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,