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

Igor Gnatenko notifications at github.com
Mon Jun 24 15:08:09 UTC 2019


ignatenkobrain 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

what about doing a bit less of escaping?

`sh -c 'file "$@" | grep -v " shared object," | sed -n -e "s/^\(.*\):[ \t]*ELF.*, not stripped.*/\1p" | xargs $STRIP -g' ARG0`

-- 
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#pullrequestreview-253475986
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190624/dac91cb6/attachment.html>


More information about the Rpm-maint mailing list