pmb: build: envkernel: Fix bind mount detection (MR 2217)

At the moment the "envkernel.sh hasn't run, assuming the kernel was
cross compiled on host and using current dir as source" code path
triggers even when using envkernel.sh, which works somewhat but
requires sourcing envkernel.sh again after each invocation of
"pmbootstrap build --envkernel ...".

The reason is that os.path.ismount() does not work for bind mounts
(see https://bugs.python.org/issue29707). There is a workaround for
that already in pmbootstrap but it is not used here for some reason.
This commit is contained in:
Minecrell 2022-10-20 11:36:29 +02:00
parent dfada2a522
commit 3b5492d91e
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ def run_abuild(args, pkgname, arch, apkbuild_path, kbuild_out):
flag_file = "envkernel-bind-mounted"
host_build = False
if not os.path.ismount(chroot + "/mnt/linux"):
if not pmb.helpers.mount.ismount(chroot + "/mnt/linux"):
logging.info("envkernel.sh hasn't run, assuming the kernel was cross compiled"
"on host and using current dir as source")
host_build = True