commit: 31e62c9ca151083e0b84bab8f478bb27592c5086 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> AuthorDate: Tue May 21 16:28:52 2024 +0000 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> CommitDate: Fri Jun 7 21:45:23 2024 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=31e62c9c
Explicitly declare repo as main when it does not match the default main Otherwise Portage complains about PORTDIR not being set. Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> Closes: https://github.com/gentoo/catalyst/pull/13 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> catalyst/base/stagebase.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 4bcab30c..1ebb2245 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -921,6 +921,12 @@ class StageBase(TargetBase, ClearBase, GenBase): continue config = configparser.ConfigParser() + + # If default is present but does not match this repo's location, + # then we need to explicitly set it as the main repo. + if default is not None: + config['DEFAULT'] = {'main-repo': name} + config[name] = {'location': location} self.write_repo_conf(name, config)
