Skip to content
Snippets Groups Projects
Unverified Commit 234673ce authored by Casey's avatar Casey :recycle: Committed by Oliver Smith
Browse files

build: special case building abuild (MR 2356)


Since abuild is an implicit dependency of everything, we need special
case handling for it. Insert it as a dependency of the first package in
the build queue so that it will be built if outdated, then after
building re-install it in the chroot so all subsequent packages will use
the freshly built abuild.

This is currently used for systemd where we use an abuild fork

Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
parent 9bd58603
No related branches found
No related tags found
1 merge request!2356build: special case building abuild
Pipeline #187989 passed
......@@ -149,6 +149,10 @@ def finish(apkbuild, channel, arch, output: Path, chroot: Chroot, strict=False):
logging.info(f"@YELLOW@=>@END@ @BLUE@{channel}/{apkbuild['pkgname']}@END@: Done!")
if apkbuild["pkgname"] == "abuild":
logging.info("NOTE: re-installing abuild since it was just built")
pmb.chroot.apk.install(["abuild"], chroot, build=False)
_package_cache: dict[str, list[str]] = {}
......@@ -232,6 +236,12 @@ def process_package(
logging.debug(f"{arch}/{pkgname}: Generating dependency tree")
# Add the package to the build queue
base_depends = get_depends(context, base_apkbuild)
# We use a fork of abuild for systemd, make sure it gets built if necessary by adding
# it as a dependency of the first package
if "abuild" not in base_depends:
base_depends.insert(0, "abuild")
depends = base_depends.copy()
base_build_status = BuildStatus.NEW if force else BuildStatus.UNNECESSARY
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment