1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 19:39:51 +03:00

pmb: only enable abuild-apk wrapper for buildroot (MR 2246)

Some packages like kernels are cross compiled from the native chroot.
the apk_wrapper won't work here! So only enable it for buildroot chroots

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-02-06 16:13:14 +01:00
parent 2bd1eb26d8
commit c5ca06d502
No known key found for this signature in database
GPG key ID: CAB5A5DBC11B967B

View file

@ -61,7 +61,7 @@ def init(args, suffix="native"):
apk_arch = pmb.parse.arch.from_chroot_suffix(args, suffix)
# Add apk wrapper that runs native apk and lies about arch
if not os.path.exists(chroot + "/usr/local/bin/abuild-apk"):
if suffix.startswith("buildroot_") and not os.path.exists(chroot + "/usr/local/bin/abuild-apk"):
with open(chroot + "/tmp/apk_wrapper.sh", "w") as handle:
content = f"""
#!/bin/sh