mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-14 11:59:47 +03:00
build: init: simplify installing build deps (MR 2363)
No reason to handle abuild separately here. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
30d8ea997f
commit
02f9da9a64
2 changed files with 7 additions and 4 deletions
|
@ -15,16 +15,19 @@ from pmb.core import Chroot
|
|||
from pmb.core.context import get_context
|
||||
|
||||
|
||||
def init_abuild_minimal(chroot: Chroot = Chroot.native(), additional_pkgs: list[str] = []):
|
||||
def init_abuild_minimal(chroot: Chroot = Chroot.native(), build_pkgs: list[str] = []):
|
||||
"""Initialize a minimal chroot with abuild where one can do 'abuild checksum'."""
|
||||
marker = chroot / "tmp/pmb_chroot_abuild_init_done"
|
||||
if os.path.exists(marker):
|
||||
return
|
||||
|
||||
if not build_pkgs:
|
||||
build_pkgs = pmb.config.build_packages
|
||||
|
||||
# pigz is multithreaded and makes compression must faster, we install it in the native
|
||||
# chroot and then symlink it into the buildroot so we aren't running it through QEMU.
|
||||
# pmb.chroot.apk.install(["pigz"], Chroot.native(), build=False)
|
||||
pmb.chroot.apk.install(["abuild"] + additional_pkgs, chroot, build=False)
|
||||
pmb.chroot.apk.install(build_pkgs, chroot, build=False)
|
||||
|
||||
# Fix permissions
|
||||
pmb.chroot.root(["chown", "root:abuild", "/var/cache/distfiles"], chroot)
|
||||
|
@ -47,7 +50,7 @@ def init(chroot: Chroot = Chroot.native()) -> bool:
|
|||
# Initialize chroot, install packages
|
||||
pmb.chroot.init(Chroot.native())
|
||||
pmb.chroot.init(chroot)
|
||||
init_abuild_minimal(chroot, additional_pkgs=pmb.config.build_packages)
|
||||
init_abuild_minimal(chroot)
|
||||
|
||||
# Generate package signing keys
|
||||
if not os.path.exists(get_context().config.work / "config_abuild/abuild.conf"):
|
||||
|
|
|
@ -209,7 +209,7 @@ chroot_outdated = 3600 * 24 * 2
|
|||
|
||||
# Packages that will be installed in a chroot before it builds packages
|
||||
# for the first time
|
||||
build_packages = ["abuild", "build-base", "ccache", "git"]
|
||||
build_packages = ["abuild", "apk-tools", "build-base", "ccache", "git"]
|
||||
|
||||
#
|
||||
# PARSE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue