1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 11:29:46 +03:00

helpers: apk: move update_repository_list() from chroot.apk (MR 2463)

This function better belongs here, especially as it will be used outside
of the context of a chroot() soon.

Additionally, it's adjusted to take the rootfs path as its first
argument rather than a chroot, since it could operate on any rootfs.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-10-27 23:10:59 +01:00
parent af1bf53867
commit 12846f3b8e
No known key found for this signature in database
GPG key ID: 0583312B195F64B6
6 changed files with 62 additions and 57 deletions

View file

@ -211,7 +211,7 @@ def chroot(args: PmbArgs) -> None:
size_reserve = 2048 # 2 GiB
pmb.install.blockdevice.create_and_mount_image(args, size_boot, size_root, size_reserve)
pmb.chroot.apk.update_repository_list(chroot, user_repository=True)
pmb.helpers.apk.update_repository_list(chroot.path, user_repository=True)
# TODO: Maybe this could be done better.
output_type = cast(RunOutputType, args.output)