'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
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";