[pacman-dev] [PATCH 1/2] makepkg: fix extraction of soname in find_libdepends

Florian Pritz bluewind at xinu.at
Sun Mar 4 15:19:43 EST 2012


libperl.so results in soname="libperl.so.so" which is wrong.

This returns the correct string: "libperl.so"

Fix-by: Dave Reisner <dreisner at archlinux.org>
Signed-off-by: Florian Pritz <bluewind at xinu.at>
---
This should be applied to both master and maint.

 scripts/makepkg.sh.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 6e7a556..9301730 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1071,7 +1071,7 @@ find_libdepends() {
 		for sofile in $(LC_ALL=C readelf -d "$filename" 2>/dev/null | sed -nr 's/.*Shared library: \[(.*)\].*/\1/p')
 		do
 			# extract the library name: libfoo.so
-			soname="${sofile%%\.so\.*}.so"
+			soname="${sofile%.so?(+(.+([0-9])))}".so
 			# extract the major version: 1
 			soversion="${sofile##*\.so\.}"
 			if in_array "${soname}" ${depends[@]}; then
-- 
1.7.9.2


More information about the pacman-dev mailing list