[Rpm-maint] [rpm-software-management/rpm] Make brp-strip run in parallel (#762)

Panu Matilainen notifications at github.com
Tue Jun 25 06:10:26 UTC 2019


pmatilai commented on this pull request.



>  
 case `uname -a` in
 Darwin*) exit 0 ;;
 *) ;;
 esac
 
 # Strip ELF binaries
-for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
-        grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug"  | \
-	grep -v ' shared object,' | \
-	sed -n -e 's/^\(.*\):[ 	]*ELF.*, not stripped.*/\1/p'`; do
-	$STRIP -g "$f" || :
-done
+find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) | grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug"  | \
+    xargs -r -P$NCPUS -n32 sh -c "file \"\$@\" | grep -v ' shared object,' | sed -n -e 's/^\(.*\):[ 	]*ELF.*, not stripped.*/\1/p' | xargs -I\{\} $STRIP -g \{\}" ARG0

All these xargs-conversions will need to use find -print0 | xargs -0, see https://bugzilla.redhat.com/show_bug.cgi?id=1721348#c4

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/762#discussion_r297019820
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190624/cd423ef9/attachment-0001.html>


More information about the Rpm-maint mailing list