From 9b2278c8b5c696263a5c525adbb7974e854bc520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Tue, 28 Nov 2017 10:33:31 +0000 Subject: subr/pkg_install_libs.subr:pkgp_install_lib_link(): prevent recursive link. --- subr/pkg_install_libs.subr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'subr/pkg_install_libs.subr') diff --git a/subr/pkg_install_libs.subr b/subr/pkg_install_libs.subr index 61d87a56..c4b49c6e 100644 --- a/subr/pkg_install_libs.subr +++ b/subr/pkg_install_libs.subr @@ -19,11 +19,12 @@ pkgp_install_lib_check() { pkgp_install_lib_link() { local _so_path="${1}" _so_dir="${2}" _lib_name="${3}" \ _lib_link_tgt _lib_link_path; + _lib_link_path="${_so_path%.so*}.lib.a"; _lib_link_tgt="$(find "${_so_dir}" \ -name "${_lib_name%%.*}.*.lib.a" |\ sort | tail -1)"; - if [ -n "${_lib_link_tgt}" ]; then - _lib_link_path="${_so_path%.so*}.lib.a"; + if [ -n "${_lib_link_tgt}" ]\ + && [ "${_lib_link_tgt}" != "${_lib_link_path}" ]; then ex_build_fileop rm "${_lib_link_path}"; ex_build_fileop ln_symbolic "$(ex_basename "${_lib_link_tgt}")" \ "${_lib_link_path}"; -- cgit v1.2.3