diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2022-08-06 14:32:58 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2022-08-06 14:33:44 +0200 |
commit | 9d1341b48ba003fc35865c45f8bf441b166fb732 (patch) | |
tree | 485098a2f4997822497f9ee935392c96fdca7804 /scripts | |
parent | 4b9f51fc93560f63aac27a5da06f71e1dea557dc (diff) | |
download | ptxdist-9d1341b48ba003fc35865c45f8bf441b166fb732.tar.gz ptxdist-9d1341b48ba003fc35865c45f8bf441b166fb732.tar.xz |
python-wrapper: handle host-python3
The python-wrapper may now be created for the same path as the host Python
binary. So accept access when host-python3 is selected and the binary in
sysroot-host is found.
Fixes: e2d7d9deeb9a ("ptxd_lib_setup_host_wrapper: add wrapper symlinks for all python versions")
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/wrapper/python-wrapper | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/wrapper/python-wrapper b/scripts/wrapper/python-wrapper index 2ea0b2680..e40b325c6 100755 --- a/scripts/wrapper/python-wrapper +++ b/scripts/wrapper/python-wrapper @@ -21,6 +21,7 @@ case " ${pkg_build_deps} " in *" ${dep} "*) ;; *" host-system-python "*) name=python2 ;; *" host-system-python3 "*) name=python3 ;; + *" host-python3 "*) host=1;; *) if [ -n "${pkg_stamp}" ]; then echo -e "\n'${pkg_stamp%.*}' must depend on '${dep}' for '${name}'!\n" >&2 @@ -38,6 +39,10 @@ for path in $(type -a -P ${name}); do if [ "${path}" = "${skip}" ]; then continue fi + if [[ -n "${host}" && ! ( "${path}" =~ "sysroot-host/bin/python3." ) ]]; then + echo -e "\n'${pkg_stamp%.*}' must depend on '${dep}' for '${name}'!\n" >&2 + exit 1 + fi exec "${path}" "${@}" done |