diff options
author | Tim Harder <radhermit@gmail.com> | 2015-06-27 13:41:11 -0400 |
---|---|---|
committer | Tim Harder <radhermit@gmail.com> | 2015-06-27 13:41:11 -0400 |
commit | 21d82472285548b34a82218a38031ec8ae760a26 (patch) | |
tree | 4d77702154368ebfc2942472a55282b00634dedd | |
parent | portage_conf: revert to using the default repo as a default parent repo (diff) | |
download | pkgcore-21d82472285548b34a82218a38031ec8ae760a26.tar.gz pkgcore-21d82472285548b34a82218a38031ec8ae760a26.tar.bz2 pkgcore-21d82472285548b34a82218a38031ec8ae760a26.zip |
portage_conf: re-add config object simplification for the base case
We don't need a multiplex setup for the base case where only the default
repo exists.
-rw-r--r-- | pkgcore/ebuild/portage_conf.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pkgcore/ebuild/portage_conf.py b/pkgcore/ebuild/portage_conf.py index 8b4ab46ac..b5096ca4e 100644 --- a/pkgcore/ebuild/portage_conf.py +++ b/pkgcore/ebuild/portage_conf.py @@ -483,10 +483,13 @@ def config_from_make_conf(location="/etc/", profile_override=None, **kwargs): # to dynamically create this from the config at runtime on attr access. profiles.ProfileNode._repo_map = ImmutableDict(repo_map) - config['repo-stack'] = basics.FakeIncrementalDictConfigSection( - my_convert_hybrid, { - 'class': 'pkgcore.repository.multiplex.config_tree', - 'repositories': tuple(repos)}) + if len(repos) > 1: + config['repo-stack'] = basics.FakeIncrementalDictConfigSection( + my_convert_hybrid, { + 'class': 'pkgcore.repository.multiplex.config_tree', + 'repositories': tuple(repos)}) + else: + config['repo-stack'] = basics.section_alias(default_repo, 'repo') config['vuln'] = basics.AutoConfigSection({ 'class': SecurityUpgradesViaProfile, |