Author: glen                         Date: Wed Dec  6 19:02:41 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- show statistics when compressing kernel modules
- print compress kernel modules message only if kernel modules dir present

---- Files affected:
SOURCES:
   rpm.macros (1.337 -> 1.338) 

---- Diffs:

================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.337 SOURCES/rpm.macros:1.338
--- SOURCES/rpm.macros:1.337    Tue Dec  5 18:28:07 2006
+++ SOURCES/rpm.macros  Wed Dec  6 20:02:36 2006
@@ -406,14 +406,13 @@
 #%no_install_post_compress_modules     1
 %__spec_install_post_compress_modules { \
 %{!?no_install_post_compress_modules: __spec_install_post_compress_modules() { 
\
-       if [ -d "$RPM_BUILD_ROOT" ]; then \
-               echo "Compress kernel modules if any."; \
-               if test -d $RPM_BUILD_ROOT/lib/modules ; then \
-                       find $RPM_BUILD_ROOT/lib/modules -name \*o -type f 
-print | \
-                       xargs -r %{__gzip} -9nf; \
-                       find $RPM_BUILD_ROOT/lib/modules -name \*o -type l 
-printf "%p %l\n" | \
-                       while read a b; do ln -sf $b.gz $a.gz; rm -f $a; done; \
-               fi; \
+       if [ -d $RPM_BUILD_ROOT/lib/modules ]; then \
+               echo "Compress kernel modules"; \
+               q=$(find $RPM_BUILD_ROOT/lib/modules -name '*o' -type f 
-print); \
+               echo "$q" | xargs -r %{__gzip} -9nf; \
+               printf "%d modules compressed\n" $(echo "$q" | wc -l); \
+               find $RPM_BUILD_ROOT/lib/modules -name '*o' -type l -printf "%p 
%l\n" | \
+               while read a b; do ln -sf $b.gz $a.gz; rm -f $a; done; \
        fi; \
 }; __spec_install_post_compress_modules } }
 
================================================================

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

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

Reply via email to