config: init: support --aports too (MR 2470)

We shouldn't overwrite config.aports if the user specified a custom
--aports directory. We only want to do this to update the default if
they're using a custom workdir.

Make the code here less aggressive, and correctly use the last entry in
config.aports as "pmaports" instead of the first.

Fixes: #2386
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-11-02 16:47:20 +01:00 committed by Oliver Smith
parent a72a60f546
commit d57b9e31e1
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 6 additions and 3 deletions

View file

@ -886,6 +886,7 @@ def get_parser():
parser.add_argument(
"-w",
"--work",
type=lambda x: Path(x).absolute(),
help="folder where all data gets stored (chroots, caches, built packages)",
)
parser.add_argument(