From cf154b34653daed4f670bf982aefbe4b01b2ba75 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Fri, 10 May 2024 11:01:21 +0200 Subject: [PATCH] Change 'build' command to pass '--jobs' option to 'build' tool only if 'build_jobs' > 0 --- osc/build.py | 2 +- osc/conf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osc/build.py b/osc/build.py index 460180e0..b0df9af1 100644 --- a/osc/build.py +++ b/osc/build.py @@ -816,7 +816,7 @@ def main(apiurl, store, opts, argv): buildargs.append('--threads=%s' % opts.threads) if opts.jobs: buildargs.append('--jobs=%s' % opts.jobs) - elif config['build-jobs'] > 1: + elif config['build-jobs'] > 0: buildargs.append('--jobs=%s' % config['build-jobs']) if opts.icecream or config['icecream'] != '0': if opts.icecream: diff --git a/osc/conf.py b/osc/conf.py index 51fc3876..7b9e677a 100644 --- a/osc/conf.py +++ b/osc/conf.py @@ -1014,7 +1014,7 @@ class Options(OscOptions): The number of parallel processes during the build. Defaults to the number of available CPU threads. - Passed as ``--jobs`` to the build tool. + If the value is greater than ``0`` then it is passed as ``--jobs`` to the build tool. """ ), ini_key="build-jobs",