From c5e1fa55793853e7ec31808a4345ffd8ba8e6a47 Mon Sep 17 00:00:00 2001 From: Daenyth Blank Date: Sun, 27 Apr 2008 08:10:55 -0400 Subject: [PATCH] Fixed FS#10294 --- scripts/makepkg.sh.in | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 1eb3d3a..824a80a 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -770,16 +770,26 @@ tidy_install() { fi - if [ "$(check_option strip)" = "y" ]; then - msg2 "$(gettext "Stripping debugging symbols from binaries and libraries...")" - for file in $(find {,usr/{,local/},opt/*/}{bin,lib,sbin} -type f 2>/dev/null || true); do - case "$(file -biz "$file")" in + # Fix FS#10294 - makepkg - "Stripping debugging symbols[..]" can't cope with whitespaces in filenames + function _stirip_symbols + { + if [ $# -eq 1 ]; then + local file="$1" + case "$file" in *application/x-sharedlib*) # Libraries /usr/bin/strip --strip-debug "$file";; *application/x-executable*) # Binaries /usr/bin/strip "$file";; esac - done + return 0 + else + return 1 + fi + } + + if [ "$(check_option strip)" = "y" ]; then + msg2 "$(gettext "Stripping debugging symbols from binaries and libraries...")" + find {,usr/{,local/},opt/*/}{bin,lib,sbin} -type f -exec _strip_symbols("{}") 2>/dev/null || true fi if [ "$(check_option libtool)" = "n" ]; then -- 1.5.5.1