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:
parent
aedab4df73
commit
fc010bc7c8
7 changed files with 44 additions and 72 deletions
|
@ -639,8 +639,9 @@ def get_parser():
|
|||
parser = argparse.ArgumentParser(prog="pmbootstrap")
|
||||
arch_native = Arch.native()
|
||||
arch_choices = Arch.supported()
|
||||
# FIXME: we should load the real config instead here
|
||||
default_config = Config()
|
||||
mirrors_pmos_default = ",".join(default_config.mirrors_postmarketos)
|
||||
mirrors_pmos_default = default_config.mirrors["pmaports"]
|
||||
|
||||
# Other
|
||||
parser.add_argument("-V", "--version", action="version",
|
||||
|
@ -649,14 +650,14 @@ def get_parser():
|
|||
default=pmb.config.defaults["config"],
|
||||
help="path to pmbootstrap.cfg file (default in"
|
||||
" ~/.config/)")
|
||||
parser.add_argument("-mp", "--mirror-pmOS", dest="mirrors_postmarketos",
|
||||
parser.add_argument("-mp", "--mirror-pmOS", dest="mirror_postmarketos",
|
||||
help="postmarketOS mirror, disable with: -mp='',"
|
||||
" specify multiple with: -mp='one' -mp='two',"
|
||||
f" default: {mirrors_pmos_default}",
|
||||
metavar="URL", action="append", default=[])
|
||||
parser.add_argument("-m", "--mirror-alpine", dest="mirror_alpine",
|
||||
help="Alpine Linux mirror, default: "
|
||||
f"{default_config.mirror_alpine}",
|
||||
f"{default_config.mirrors["alpine"]}",
|
||||
metavar="URL")
|
||||
parser.add_argument("-j", "--jobs", help="parallel jobs when compiling")
|
||||
parser.add_argument("-E", "--extra-space",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue