curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #01241
[Merge] ~nacc/curtin:nacc/curtin-mirror-config into curtin:master
Nish Aravamudan has proposed merging ~nacc/curtin:nacc/curtin-mirror-config into curtin:master.
Requested reviews:
curtin developers (curtin-dev)
For more details, see:
https://code.launchpad.net/~nacc/curtin/+git/curtin/+merge/395582
--
Your team curtin developers is requested to review the proposed merge of ~nacc/curtin:nacc/curtin-mirror-config into curtin:master.
diff --git a/curtin/commands/apt_config.py b/curtin/commands/apt_config.py
index ff906be..5ed628e 100644
--- a/curtin/commands/apt_config.py
+++ b/curtin/commands/apt_config.py
@@ -298,12 +298,19 @@ def generate_sources_list(cfg, release, mirrors, target=None):
tmpl = util.load_file(paths.target_path(target, aptsrc))
# Strategy if no custom template was provided:
# - Only replacing mirrors
+ # + Allow overriding via config (@params)
# - no reason to replace "release" as it is from target anyway
# - The less we depend upon, the more stable this is against changes
# - warn if expected original content wasn't found
- tmpl = mirror_to_placeholder(tmpl, default_mirrors['PRIMARY'],
+ tmpl = mirror_to_placeholder(tmpl,
+ params.fetch(
+ 'PRIMARY',
+ default_mirrors['PRIMARY']),
"$MIRROR")
- tmpl = mirror_to_placeholder(tmpl, default_mirrors['SECURITY'],
+ tmpl = mirror_to_placeholder(tmpl,
+ params.fetch(
+ 'SECURITY',
+ default_mirrors['SECURITY']),
"$SECURITY")
orig = paths.target_path(target, aptsrc)
Follow ups