SOURCES: rpm.macros - work with spaces in filenames for chrpath an...

glen glen at pld-linux.org
Tue Dec 26 22:29:07 CET 2006


Author: glen                         Date: Tue Dec 26 21:29:07 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- work with spaces in filenames for chrpath and strip

---- Files affected:
SOURCES:
   rpm.macros (1.357 -> 1.358) 

---- Diffs:

================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.357 SOURCES/rpm.macros:1.358
--- SOURCES/rpm.macros:1.357	Sat Dec 23 03:35:46 2006
+++ SOURCES/rpm.macros	Tue Dec 26 22:29:01 2006
@@ -354,10 +354,10 @@
 	if [ -z "$filelist" ]; then \
 		return; \
 	fi; \
-	filetypes=`echo $filelist | xargs -r file`; \
-	elfexelist=`echo "$filetypes" | awk '/ELF.*executable/ {print $1}' | cut -d: -f1`; \
-	elfsharedlist=`echo "$filetypes" | awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
-	archiveslist=`echo "$filetypes" | awk '/current ar archive/ {print $1}' | cut -d: -f1`; \
+	filetypes=`echo "$filelist" | xargs -r -d'\\n' file`; \
+	elfexelist=`echo "$filetypes" | awk -F: '/ELF.*executable/ {print $1}'`; \
+	elfsharedlist=`echo "$filetypes" | awk -F: '/LF.*shared object/ {print $1}'`; \
+	archiveslist=`echo "$filetypes" | awk -F '/current ar archive/ {print $1}'`; \
 	if [ -n "$elfexelist" ]; then \
 		printf "Stripping %d ELF executables..." $(echo "$elfexelist" | wc -l); \
 		chmod u+w $elfexelist; \
@@ -389,7 +389,7 @@
 if [ -d "$RPM_BUILD_ROOT" ]; then \
 	files=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*" ! -regex ".*/usr/lib[0-9]*/debug/.*" %{?_noautochrpath:! -regex "%{_noautochrpath}"}`; \
 	if [ -n "$files" ]; then \
-		objs=`echo "$files" | xargs -r file | awk '/ELF.*(executable.*dynamically linked|shared object)/ {print $1}' | cut -d: -f1`; \
+		objs=`echo "$files" | xargs -r -d'\\n' file | awk -F: '/ELF.*(executable.*dynamically linked|shared object)/ {print $1}'`; \
 	fi
 	#"
 	if [ -n "$objs" ]; then \
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/rpm.macros?r1=1.357&r2=1.358&f=u



More information about the pld-cvs-commit mailing list