From: Zhang Qiang Date: Fri, 18 Jan 2013 03:34:07 +0000 (-0500) Subject: use the processors number instead of hard code 4 to build X-Git-Tag: 0.4~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=588d4a8a22b9b64c0c26ef6037524ee707cdfce7;p=tools%2Fdepanneur.git use the processors number instead of hard code 4 to build 'build' can accept --jobs option to set the %jobs and %_smp_mflags macros for rpm build, so the proper value should be the max number of (number of system processors, 4) Change-Id: I55a8111baf3ed04b99aef6865c39ac6e054af48a --- diff --git a/depanneur b/depanneur index f573acf..8922ab9 100755 --- a/depanneur +++ b/depanneur @@ -1071,7 +1071,9 @@ sub build_package { push @args, "--use-system-qemu"; } push @args, "--uid $zuid:$zgid"; - push @args, "--jobs 4"; + my $nprocessors = int(`getconf _NPROCESSORS_ONLN`); + $nprocessors = 4 if ($nprocessors < 4); + push @args, "--jobs $nprocessors"; push @args, "--no-init" if ($noinit == 1); push @args, "--keep-packs" if ($keep_packs == 1); push @args, "--cachedir $cache_dir";