From e626628a338aa90f9cf321ec89789da72f67a9e0 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 27 Dec 2011 23:13:41 -0800 Subject: RepoConfig.update(): copy more attributes This fixes a regression since commit 10246cd535f909dda8bd05de617c32d2b8a56b4a which caused layout.conf settings such as thin-manifests to be ignored for repositories that had repos.conf settings that did not specify the repository location. In order to trigger this case, ResolverPlayground has been modified to omit the location of each repository in the repos.conf file that it generates. --- pym/portage/repository/config.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'pym/portage/repository') diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index f98b9b7ea..4bf995e33 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -199,8 +199,9 @@ class RepoConfig(object): def update(self, new_repo): """Update repository with options in another RepoConfig""" - for k in ('aliases', 'eclass_overrides', 'location', 'masters', - 'name', 'priority', 'sync', 'user_location'): + keys = set(self.__slots__) + keys.discard("missing_repo_name") + for k in keys: v = getattr(new_repo, k, None) if v is not None: setattr(self, k, v) @@ -324,7 +325,13 @@ class RepoConfigLoader(object): repo_opts = default_repo_opts.copy() repo_opts['location'] = ov repo = RepoConfig(None, repo_opts) - # repos_conf_opts contains options from /etc/portage/repos.conf + # repos_conf_opts may contain options from various places: + # 1) /etc/portage/repos.conf + # 2) $location/metadata/layout.conf if repos.conf specified + # the repo location + # 3) A RepoConfig instance corresponding to a previously + # processed path in the current list of overlays which + # referred to a repository with the same name. repos_conf_opts = prepos.get(repo.name) if repos_conf_opts is not None: if repos_conf_opts.aliases is not None: -- cgit v1.2.3-1-g7c22