chroot: don't depende on alpine-base

In alpine it depends on openrc, and therefore we cannot install
systemd with it. This is necessary to get rid of the systemd-fork
and move forward with the usr-merge.

Requirement for: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6375
This commit is contained in:
Pablo Correa Gómez 2025-04-03 17:00:25 +02:00 committed by Oliver Smith
parent d5e4d76118
commit 12d125ab8b
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -152,9 +152,11 @@ def init(chroot: Chroot, usr_merge: UsrMerge = UsrMerge.AUTO) -> None:
pmb.config.workdir.chroot_save_init(chroot)
# Install alpine-base
# Install minimal amount of things to get a functional chroot.
# We don't use alpine-base since it depends on openrc, and neither
# postmarketos-base, since that's quite big (e.g: contains an init system)
pmb.helpers.repo.update(arch)
pkgs = ["alpine-base"]
pkgs = ["alpine-baselayout", "apk-tools", "busybox", "musl-utils"]
cmd: list[PathString] = ["--initdb"]
pmb.helpers.apk.run([*cmd, "add", *pkgs], chroot)