build: envkernel: install makedepends (!1824)
Currently, building with envkernel.sh entirely ignores the makedepends listed in the kernel APKBUILD. Common dependencies needed by most kernels are hardcoded in envkernel.sh. However, some kernels may need extra dependencies either during the build process or when the kernel is packaged. Installing the makedepends when the build environment is initialized is difficult because "source helpers/envkernel.sh" is not aware of the exact kernel package that is going to be built later. However, we can easily modify the packaging step (i.e. pmbootstrap build --envkernel linux-...) to install the required makedepends. This fixes building "linux-postmarketos-qcom-msm8916" using envkernel, since it requires "dtbTool" and "installkernel" to be installed when the APKBUILD package() function is executed.
This commit is contained in:
parent
9ed179594e
commit
8881b0489f
|
@ -191,6 +191,12 @@ def package_kernel(args):
|
||||||
arch = args.deviceinfo["arch"]
|
arch = args.deviceinfo["arch"]
|
||||||
apkbuild = pmb.parse.apkbuild(args, apkbuild_path, check_pkgname=False)
|
apkbuild = pmb.parse.apkbuild(args, apkbuild_path, check_pkgname=False)
|
||||||
suffix = pmb.build.autodetect.suffix(args, apkbuild, arch)
|
suffix = pmb.build.autodetect.suffix(args, apkbuild, arch)
|
||||||
|
|
||||||
|
# Install package dependencies
|
||||||
|
depends, _ = pmb.build._package.build_depends(args, apkbuild, args.arch_native, strict=False)
|
||||||
|
pmb.build.init(args, suffix)
|
||||||
|
pmb.chroot.apk.install(args, depends, suffix)
|
||||||
|
|
||||||
output = (arch + "/" + apkbuild["pkgname"] + "-" + apkbuild["pkgver"] +
|
output = (arch + "/" + apkbuild["pkgname"] + "-" + apkbuild["pkgver"] +
|
||||||
"-r" + apkbuild["pkgrel"] + ".apk")
|
"-r" + apkbuild["pkgrel"] + ".apk")
|
||||||
message = "(" + suffix + ") build " + output
|
message = "(" + suffix + ") build " + output
|
||||||
|
|
Loading…
Reference in New Issue