packages: rpm-build-macros/rpm.macros - use xargs to ensure work with weird...

glen glen at pld-linux.org
Tue Jul 12 23:43:03 CEST 2011


Author: glen                         Date: Tue Jul 12 21:43:03 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use xargs to ensure work with weird filenames

---- Files affected:
packages/rpm-build-macros:
   rpm.macros (1.610 -> 1.611) 

---- Diffs:

================================================================
Index: packages/rpm-build-macros/rpm.macros
diff -u packages/rpm-build-macros/rpm.macros:1.610 packages/rpm-build-macros/rpm.macros:1.611
--- packages/rpm-build-macros/rpm.macros:1.610	Sat Apr  9 15:54:08 2011
+++ packages/rpm-build-macros/rpm.macros	Tue Jul 12 23:42:58 2011
@@ -558,20 +558,20 @@
 		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; \
-			%{__strip} --remove-section=.note --remove-section=.comment $elfexelist; \
+			echo "$elfexelist" | xargs -r -d'\n' chmod u+w; \
+			echo "$elfexelist" | xargs -r -d'\n' %{__strip} --remove-section=.note --remove-section=.comment; \
 			echo "DONE"; \
 		fi; \
 		if [ -n "$elfsharedlist" ]; then \
 			printf "Stripping %d ELF shared libraries..." $(echo "$elfsharedlist" | wc -l); \
-			chmod u+w $elfsharedlist; \
-			%{__strip} --strip-unneeded --remove-section=.note --remove-section=.comment $elfsharedlist; \
+			echo "$elfsharedlist" | xargs -r -d'\n' chmod u+w; \
+			echo "$elfsharedlist" | xargs -r -d'\n' %{__strip} --strip-unneeded --remove-section=.note --remove-section=.comment; \
 			echo "DONE"; \
 		fi; \
 		if [ -n "$archiveslist" ]; then \
 			printf "Stripping %d ar archives..." $(echo "$archiveslist" | wc -l); \
-			chmod u+w $archiveslist; \
-			%{__strip} --strip-debug --remove-section=.note --remove-section=.comment $archiveslist; \
+			echo "$archiveslist" | xargs -r -d'\n' chmod u+w; \
+			echo "$archiveslist" | xargs -r -d'\n' %{__strip} --strip-debug --remove-section=.note --remove-section=.comment; \
 			echo "DONE"; \
 		fi; \
 	fi; \
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/rpm-build-macros/rpm.macros?r1=1.610&r2=1.611&f=u



More information about the pld-cvs-commit mailing list