Author: glen                         Date: Tue Sep 18 08:11:03 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix when kernel modules dir is empty from modules

---- Files affected:
SOURCES:
   rpm.macros (1.392 -> 1.393) 

---- Diffs:

================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.392 SOURCES/rpm.macros:1.393
--- SOURCES/rpm.macros:1.392    Thu Sep  6 22:49:11 2007
+++ SOURCES/rpm.macros  Tue Sep 18 10:10:58 2007
@@ -366,10 +366,13 @@
 if [ -d "$RPM_BUILD_ROOT" ]; then \
        if [ -d $RPM_BUILD_ROOT/lib/modules ]; then \
                modulelist=$(find $RPM_BUILD_ROOT/lib/modules -name '*o' -type 
f -print); \
-               printf "Stripping %d kernel modules..." $(echo "$modulelist" | 
wc -l); \
-               echo "$modulelist" | xargs -l512 chmod u+w; \
-               echo "$modulelist" | xargs -l512 %{__strip} --strip-unneeded 
--remove-section=.comment --remove-section=.note.GNU-stack; \
-               echo "DONE"; \
+               modulecount=$(echo -n "$modulelist" | wc -l); \
+               if [ "$modulecount" -gt 0 ]; then \
+                       printf "Stripping %d kernel modules..."; \
+                       echo "$modulelist" | xargs -l512 chmod u+w; \
+                       echo "$modulelist" | xargs -l512 %{__strip} 
--strip-unneeded --remove-section=.comment --remove-section=.note.GNU-stack; \
+                       echo "DONE"; \
+               fi; \
        fi; \
        filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*" ! 
-regex ".*/usr/lib[0-9]*/debug/.*\.debug" ! -regex ".*%{_docdir}/.*" ! -regex 
".*%{_includedir}/.*" %{?_noautostrip:! -regex "%{_noautostrip}"}`; \
        # vim - " \
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm.macros?r1=1.392&r2=1.393&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to