WIP: 2024-06-05: args hacking and more (MR 2252)

Continue removing args and do some other optimisations.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-05 05:31:02 +02:00 committed by Oliver Smith
parent 5bb2390d98
commit de4c912692
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
52 changed files with 498 additions and 464 deletions

View file

@ -58,6 +58,7 @@ def urls(user_repository=True, postmarketos_mirror=True, alpine=True):
"http://...", ...]
"""
ret: List[str] = []
context = get_context()
# Get mirrordirs from channels.cfg (postmarketOS mirrordir is the same as
# the pmaports branch of the channel, no need to make it more complicated)
@ -68,9 +69,9 @@ def urls(user_repository=True, postmarketos_mirror=True, alpine=True):
# Local user repository (for packages compiled with pmbootstrap)
if user_repository:
channel = pmb.config.pmaports.read_config()["channel"]
ret.append(str(get_context().config.work / "packages" / channel))
# FIXME: We shouldn't hardcod this here
ret.append("/mnt/pmbootstrap/packages")
context = get_context()
# Upstream postmarketOS binary repository
if postmarketos_mirror:
for mirror in context.config.mirrors_postmarketos: