]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- fix when kernel modules dir is empty from modules auto/ac/rpm-build-macros-1_393-1 auto/th/rpm-build-macros-1_393-1
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 18 Sep 2007 08:10:58 +0000 (08:10 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm.macros -> 1.393

rpm.macros

index 681d92cdd869958fcb77eebc656e8ec29d8686a5..8823f13538f33b0aceb3469b65796992eef117fd 100644 (file)
@@ -366,10 +366,13 @@ unset DISPLAY ||:\
 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 - " \
This page took 0.07314 seconds and 4 git commands to generate.