diff --git a/common/hooks/post-install/03-strip-and-debug-pkgs.sh b/common/hooks/post-install/03-strip-and-debug-pkgs.sh index 167f5c788d3..12eac9e5051 100644 --- a/common/hooks/post-install/03-strip-and-debug-pkgs.sh +++ b/common/hooks/post-install/03-strip-and-debug-pkgs.sh @@ -106,9 +106,9 @@ hook() { fi echo " Stripped library: ${f#$PKGDESTDIR}" _soname=$(${OBJDUMP} -p "$f"|grep SONAME|awk '{print $2}') - pattern="^lib[[:alnum:]]*([-(\.*)[[:alnum:]]*)\.(so\.[0-9]*|so)" - if [[ $fname =~ $pattern ]] && [[ ${_soname} =~ $pattern ]]; then - if [ ! -f ${PKGDESTDIR}/usr/lib/${fname} ]; then + pattern="^lib[[:alnum:]_-]+\.so(\.[0-9]+)*$" + if [[ ${_soname} =~ $pattern ]]; then + if [ ! -e ${PKGDESTDIR}/usr/lib/${fname} ]; then continue fi echo "${_soname}" >> ${PKGDESTDIR}/.shlib-provides