pmb.build: install checkdepends when building (MR 2563)

Fixes a bug where checkdepends are not being installed, and packages
that run tests that depend on something in checkdepends fail because
it's missing. For example, the `plasma-workspace` forked pkg in pmaports
tells abuild to run `xwfb-run` in `check()`, this binary comes from
`xwayland-run`, which is listed in the `checkdepends`. However this
isn't being installed and so `pmb build` ultimately fails to build the
package.
This commit is contained in:
Clayton Craft 2025-03-06 14:15:23 -08:00
parent 7510e80b7b
commit a5f7d6087a
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -694,6 +694,8 @@ def packages(
" adjust your APKBUILD to specify host dependencies (e.g. libevdev-dev)"
" and build dependencies (e.g. meson) separately."
)
if "!check" not in apkbuild["options"]:
depends_build += apkbuild["checkdepends"]
if depends_host:
logging.info("*** Install host dependencies")
pmb.chroot.apk.install(depends_host, hostchroot, build=False)