repo_bootstrap: simplify custom mirrors (MR 2252)

We now have support for having mirrors per-aports repo, drop the
mirrors_postmarketos arg from chroot.init and instead have
repo_bootstrap call apk.update_repository_list() explicitly to exclude
the mirrors for the repository we're going to update.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-10 02:37:04 +02:00 committed by Oliver Smith
parent 807424ee2b
commit 15ffc2f370
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
4 changed files with 16 additions and 14 deletions

View file

@ -10,8 +10,9 @@ import glob
import pmb.config.pmaports
import pmb.helpers.repo
import pmb.build
import pmb.chroot
import pmb.chroot.apk
from pmb.build import BuildQueueItem
from pmb.core import Config
from pmb.core import get_context
from pmb import commands
@ -111,7 +112,8 @@ class RepoBootstrap(commands.Command):
self.log_progress(f"initializing {chroot} chroot (merge /usr: {usr_merge.name})")
# Initialize without pmOS binary package repo
pmb.chroot.init(chroot, usr_merge, postmarketos_mirror=False)
pmb.chroot.apk.update_repository_list(chroot, mirrors_exclude=[self.repo])
pmb.chroot.init(chroot, usr_merge)
bootstrap_stage = int(step.split("bootstrap_", 1)[1])
def log_wrapper(pkg: BuildQueueItem):