1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 03:19:47 +03:00

config: fixes + handle mirrors migration (MR 2252)

Get rid of config.mirror_alpine and mirrors_postmarketos and make sure
they get migrated over for existing users.

mirrors_postmarketos being a list was always a bit off, but now we have
per-aports mirrors which make a lot more sense for what we're trying to
do with systemd.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-10 05:46:26 +02:00 committed by Oliver Smith
parent aedab4df73
commit fc010bc7c8
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
7 changed files with 44 additions and 72 deletions

View file

@ -77,6 +77,14 @@ def init(args: PmbArgs) -> PmbArgs:
if hasattr(args, key):
delattr(args, key)
# Handle --mirror-alpine and --mirror-pmos
value = getattr(args, "mirror_alpine", None)
if value:
config.mirrors["alpine"] = value
value = getattr(args, "mirror_postmarketos", None)
if value:
config.mirrors["pmaports"] = value
# Configure runtime context
context = Context(config)
context.command_timeout = args.timeout