[Rpm-maint] [rpm-software-management/rpm] Use multiple (%_smp_build_ncpus) processes in brp-strip-static-archive (#663)
Florian Festi
notifications at github.com
Mon Apr 15 14:05:03 UTC 2019
ffesti commented on this pull request.
>
case `uname -a` in
Darwin*) exit 0 ;;
*) ;;
esac
# Strip static libraries.
-for f in `find "$RPM_BUILD_ROOT" -type f -a -exec file {} \; | \
- grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
+for f in `find "$RPM_BUILD_ROOT" -type f | \
+ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
+ xargs -r -P$NCPUS -n16 file | sed 's/: */: /' | \
man xargs says:
Use the -n option or the -L option with -P; otherwise chances are that only one exec will be done.
While the number was chosen by our kernel folks I guess it offers a good compromise between starting all the helpers for each file and preventing proper parallelism due to doing to much at once.
--
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/663#discussion_r275376443
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190415/6fbaece1/attachment.html>
More information about the Rpm-maint
mailing list