forked from Mirror/pmbootstrap
build: fix !pmb:crossdirect (MR 2291)
With the !pmb:crossdirect option, the crossdirect compilation method gets disabled. This means there is no /native directory mounted inside the foreign arch chroot, all binaries inside the foreign arch chroot are supposed to run in QEMU. Handle this in the apk_wrapper.sh script that we use to redirect abuild-apk to /native/usr/bin/abuild-apk. Fix for (currently with master_staging_systemd branch): >>> upower: Analyzing dependencies... /usr/local/bin/abuild-apk: line 11: /native/usr/bin/abuild-apk: not found
This commit is contained in:
parent
b473f8786e
commit
ae75f3b884
1 changed files with 8 additions and 0 deletions
|
@ -67,6 +67,14 @@ def init(args, suffix="native"):
|
|||
with open(chroot + "/tmp/apk_wrapper.sh", "w") as handle:
|
||||
content = f"""
|
||||
#!/bin/sh
|
||||
|
||||
# With !pmb:crossdirect, cross compilation is entriely done
|
||||
# in QEMU, no /native dir gets mounted inside the foreign arch
|
||||
# chroot.
|
||||
if ! [ -d /native ]; then
|
||||
exec /usr/bin/abuild-apk "$@"
|
||||
fi
|
||||
|
||||
export LD_PRELOAD_PATH=/native/usr/lib:/native/lib
|
||||
args=""
|
||||
for arg in "$@"; do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue