diff options
author | Josef Schlehofer <pepe.schlehofer@gmail.com> | 2019-04-03 20:35:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-03 20:35:37 +0200 |
commit | ff8ce9a3d58df035b902a0a921dd77c209bff130 (patch) | |
tree | 0b7260ae50adf100819fb9d6d717c67336fab6e7 /lang | |
parent | c3c5b2f35531bf029847ca9d92c85a58a4a78672 (diff) | |
parent | 0280c67103f525937569528c8ba88fa3e144a903 (diff) |
Merge pull request #8550 from jefferyto/python-fix-bin-symlinks
python,python3: Fix overridden usr/bin symlinks
Diffstat (limited to 'lang')
-rw-r--r-- | lang/python/python-package-install.sh | 4 | ||||
-rw-r--r-- | lang/python/python-package.mk | 1 | ||||
-rw-r--r-- | lang/python/python3-package.mk | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/lang/python/python-package-install.sh b/lang/python/python-package-install.sh index a1b21e49f..6b4fe54b1 100644 --- a/lang/python/python-package-install.sh +++ b/lang/python/python-package-install.sh @@ -58,6 +58,8 @@ python="$4" mode="$5" filespec="$6" +SED="${SED:-sed -e}" + find "$src_dir" -name "*\.exe" -exec rm -f {} \; process_filespec "$src_dir" "$dst_dir" "$filespec" || { @@ -68,7 +70,7 @@ process_filespec "$src_dir" "$dst_dir" "$filespec" || { usr_bin_dir="$dst_dir/usr/bin" if [ -d "$usr_bin_dir" ] ; then - sed "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python${ver}," -i $usr_bin_dir/* + $SED "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python${ver}," -i --follow-symlinks $usr_bin_dir/* fi if [ "$mode" == "sources" ] ; then diff --git a/lang/python/python-package.mk b/lang/python/python-package.mk index 9990d5340..e1196bbb8 100644 --- a/lang/python/python-package.mk +++ b/lang/python/python-package.mk @@ -69,6 +69,7 @@ define PyPackage define Package/$(1)/install $$(call PyPackage/$(1)/install,$$(1)) + SED="$(SED)" \ $(SHELL) $(python_mk_path)python-package-install.sh "2" \ "$(PKG_INSTALL_DIR)" "$$(1)" \ "$(HOST_PYTHON_BIN)" "$$(2)" \ diff --git a/lang/python/python3-package.mk b/lang/python/python3-package.mk index e52a15233..40feef420 100644 --- a/lang/python/python3-package.mk +++ b/lang/python/python3-package.mk @@ -68,6 +68,7 @@ define Py3Package define Package/$(1)/install $$(call Py3Package/$(1)/install,$$(1)) + SED="$(SED)" \ $(SHELL) $(python3_mk_path)python-package-install.sh "3" \ "$(PKG_INSTALL_DIR)" "$$(1)" \ "$(HOST_PYTHON3_BIN)" "$$(2)" \ |