config: clean up parsing and add mirrors (MR 2252)

Add a new config section "mirrors", to replace the mirrors_alpine and
mirrors_postmarketos options. This will allow for more flexibility since
we can then handle the systemd staging repo (and others like plasma
nightly) with relative ease.

The loading/saving is fixed and now properly avoids writing out default
values, this way if the defaults are changed the user won't be stuck
with old values in their pmbootstrap.cfg.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-08 22:54:30 +02:00 committed by Oliver Smith
parent 8e18b16370
commit 7a8deb0f5e
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
5 changed files with 114 additions and 14 deletions

View file

@ -924,8 +924,8 @@ def get_parser():
help="Reset config options with the given name to it's"
" default.")
config.add_argument("name", nargs="?", help="variable name, one of: " +
", ".join(sorted(pmb.config.config_keys)),
choices=pmb.config.config_keys, metavar="name")
", ".join(sorted(Config.keys())),
choices=Config.keys(), metavar="name")
config.add_argument("value", nargs="?", help="set variable to value")
# Action: bootimg_analyze