From 73f6c6b8ee4713e740a9862787582a2388ebc245 Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz Date: Apr 09 2020 20:06:54 +0000 Subject: subr/build_init.subr:buildp_init_getopts(): exit w/ error on attempt to specify maximum parallelisation job count w/ -P vs. -p jobs. --- diff --git a/subr/build_init.subr b/subr/build_init.subr index 48e4fcf..33c51e3 100644 --- a/subr/build_init.subr +++ b/subr/build_init.subr @@ -173,7 +173,11 @@ buildp_init_getopts() { F) ARG_FETCH_FORCE=1; ;; h) cat etc/build.usage; exit 0; ;; p) ARG_PARALLEL="${OPTARG}"; ;; - P) ARG_PARALLEL="auto"; ;; + P) ARG_PARALLEL="auto"; + if [ -n "${2:-}" ]\ + && rtl_isnumber "${2}"; then + _rc=1; _status="Error: maximum parallelisation job count is set with the \`-p jobs' option."; break + fi; ;; r) ARG_RESTART="${OPTARG}"; ;; R) ARG_RELAXED=1; ;; *) cat etc/build.usage; exit 1; ;;