
On Tue, 27 Mar 2018, 12:06:29 +0200, Jan Engelhardt wrote:
On Tuesday 2018-03-27 09:13, Tomáš Čech wrote:
Yes. And just to be sure: You would still create a patch file? Or would you put the find xargs sed chain somewhere in the spec file?
That is the idea, put it into spec file directly into %prep section so no patch is needed at all.
And stick to find -exec; there is almost no reason to use xargs.
Since when? "find -exec" spawns a new process for every file it finds, while xargs collects arguments until "it reaches a system-defined limit" (usually ARG_MAX). This helps to reduce the amount of exec's and can be easily compared: $ find /usr/share/ -xdev -type f -exec true \; | grep -w true | wc -l vs. $ find /usr/share/ -xdev -type f -print0 | xargs -0 -r true | grep -w true 2> /dev/null | wc -l time'ing that documents that pretty impressively (elapsed time 0m47.699s vs. 0m0.181s). Cheers. l8er manfred