forked from Mirror/pmbootstrap
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:
parent
af1bf53867
commit
12846f3b8e
6 changed files with 62 additions and 57 deletions
|
@ -136,7 +136,7 @@ def init(chroot: Chroot, usr_merge: UsrMerge = UsrMerge.AUTO) -> None:
|
|||
mark_in_chroot(chroot)
|
||||
if chroot.exists():
|
||||
copy_resolv_conf(chroot)
|
||||
pmb.chroot.apk.update_repository_list(chroot)
|
||||
pmb.helpers.apk.update_repository_list(chroot.path)
|
||||
warn_if_chroots_outdated()
|
||||
return
|
||||
|
||||
|
@ -152,7 +152,7 @@ def init(chroot: Chroot, usr_merge: UsrMerge = UsrMerge.AUTO) -> None:
|
|||
# Initialize /etc/apk/keys/, resolv.conf, repositories
|
||||
init_keys()
|
||||
copy_resolv_conf(chroot)
|
||||
pmb.chroot.apk.update_repository_list(chroot)
|
||||
pmb.helpers.apk.update_repository_list(chroot.path)
|
||||
|
||||
pmb.config.workdir.chroot_save_init(chroot)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue