if args.repositories and not (
is_dnf_distribution(args.distribution) or
- is_apt_distribution(args.distribution)
+ is_apt_distribution(args.distribution) or
+ args.distribution == Distribution.arch
):
- die("Sorry, the --repositories option is only supported on dnf and apt based distributions")
+ die("Sorry, the --repositories option is only supported on pacman, dnf and apt based distributions")
if args.initrds:
args.initrds = [p.absolute() for p in args.initrds]
config.parent.mkdir(mode=0o755, exist_ok=True, parents=True)
+ repos = ["core"]
+ if not state.config.local_mirror:
+ repos += ["extra"]
+
+ for repo in ("core-testing", "extra-testing"):
+ if repo in state.config.repositories:
+ repos += [repo]
+
with config.open("w") as f:
f.write(
dedent(
[options]
SigLevel = {sig_level}
ParallelDownloads = 5
-
- [core]
- {server}
"""
)
)
- if not state.config.local_mirror:
+ for repo in repos:
f.write(
dedent(
f"""\
- [extra]
+ [{repo}]
{server}
"""
)