chroot: always run apk static (MR 2252)

Testing by building postmarketos-initramfs (which installs >100 packages
but is very fast to build, so a worst-case scenario) this results in a
~15-20% speedup (which everything cached and doing multiple back to back
runs). From 32 seconds down to 25.

Doing a full install with --no-image, this takes us from 70 seconds on
my laptop down to 40s!

This also lets us drastically simplify pmb/helpers/apk.py!

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-05-24 04:45:36 +02:00 committed by Oliver Smith
parent cf651e56d5
commit b82c4eb167
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
5 changed files with 41 additions and 43 deletions

View file

@ -66,7 +66,8 @@ def urls(args: PmbArgs, user_repository=True, postmarketos_mirror=True, alpine=T
# Local user repository (for packages compiled with pmbootstrap)
if user_repository:
ret.append("/mnt/pmbootstrap/packages")
channel = pmb.config.pmaports.read_config(args)["channel"]
ret.append(str(pmb.config.work / "packages" / channel))
# Upstream postmarketOS binary repository
if postmarketos_mirror: