lkml.org 
[lkml]   [2015]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] builddeb: parallelize debug module installation
On 2015-04-24 20:25, Chris J Arges wrote:
> When building the dbg package, we use a large 'for module in $(find' loop that
> can be easily parallelized by using 'find | xargs'. This patch modifies this
> loop to use the later paradigm.
>
> Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
> ---
> scripts/package/builddeb | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index 88dbf23..d12d062 100755
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -152,16 +152,17 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
> rmdir "$tmpdir/lib/modules/$version"
> fi
> if [ -n "$BUILD_DEBUG" ] ; then
> - for module in $(find $tmpdir/lib/modules/ -name *.ko -printf '%P\n'); do
> - module=lib/modules/$module
> - mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
> + find $tmpdir/lib/modules/ -name *.ko -printf '%P\n' | xargs -I {} sh -c '

I guess you want to use the -P option here.

Michal


\
 
 \ /
  Last update: 2015-04-27 16:41    [W:1.026 / U:0.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site