From c093b9f5211a941bcde375819d66ac5e2a8c239d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 23 May 2014 11:46:46 +0200 Subject: [PATCH] hooks/generate-runtime-deps: if required shlib is provided by any subpkg, use it. --- common/hooks/post-install/04-generate-runtime-deps.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/common/hooks/post-install/04-generate-runtime-deps.sh b/common/hooks/post-install/04-generate-runtime-deps.sh index 1c4573f4a2..9a7508077d 100644 --- a/common/hooks/post-install/04-generate-runtime-deps.sh +++ b/common/hooks/post-install/04-generate-runtime-deps.sh @@ -34,7 +34,7 @@ hook() { local depsftmp f j tmplf mapshlibs sorequires # Disable trap on ERR, xbps-uhelper cmd might return error... but not something - # to be worried about because if there are broken shlibs this hooks returns + # to be worried about because if there are broken shlibs this hook returns # error via msg_error(). trap - ERR @@ -100,9 +100,12 @@ hook() { for j in ${rdep}; do _pkgname=$($XBPS_UHELPER_CMD getpkgname "$j") # if there's a SONAME matching pkgname, use it. - [ "${pkgname}" != "${_pkgname}" ] && continue - found=1 - break + for f in ${pkgname} ${subpackages}; do + if [ "${_pkgname}" = "${f}" ]; then + found=1 + break + fi + done done if [ -n "$found" ]; then _rdep=$j