aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2024-05-21 17:28:52 +0100
committerMatt Turner <mattst88@gentoo.org>2024-06-07 17:45:23 -0400
commit31e62c9ca151083e0b84bab8f478bb27592c5086 (patch)
treecd04330c0840a10b35152871e94f2e9c8f040a56 /catalyst
parentcreate-iso.sh: add flag for BIOS boot quirk (diff)
downloadcatalyst-31e62c9ca151083e0b84bab8f478bb27592c5086.tar.gz
catalyst-31e62c9ca151083e0b84bab8f478bb27592c5086.tar.bz2
catalyst-31e62c9ca151083e0b84bab8f478bb27592c5086.zip
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@gentoo.org> Closes: https://github.com/gentoo/catalyst/pull/13 Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'catalyst')
-rw-r--r--catalyst/base/stagebase.py6
1 files changed, 6 insertions, 0 deletions
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)