forked from Mirror/pmbootstrap
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:
parent
aedab4df73
commit
fc010bc7c8
7 changed files with 44 additions and 72 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue