diff options
author | Mike Frysinger <vapier@gentoo.org> | 2017-02-09 13:15:13 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2017-02-09 13:16:07 -0500 |
commit | 9470312c23d126f0055f82c0e656003b3945430b (patch) | |
tree | b7f2359d9f627ac59df262213d391b7d420b3768 /eclass/multiprocessing.eclass | |
parent | dev-php/PEAR-Text_Figlet: remove unused PEAR-Text_Figlet-1.0.2.ebuild. (diff) | |
download | gentoo-9470312c23d126f0055f82c0e656003b3945430b.tar.gz gentoo-9470312c23d126f0055f82c0e656003b3945430b.tar.bz2 gentoo-9470312c23d126f0055f82c0e656003b3945430b.zip |
multiprocess.eclass: makeopts_{jobs,loadavg}: fix implicit handling of $MAKEOPTS #608242
We missed quoting on ${MAKEOPTS} to set it as the first arg which meant
we might load invalid values into the second arg which is the "infinite"
scenario.
Diffstat (limited to 'eclass/multiprocessing.eclass')
-rw-r--r-- | eclass/multiprocessing.eclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eclass/multiprocessing.eclass b/eclass/multiprocessing.eclass index 67f7e2d65b42..73d852410b91 100644 --- a/eclass/multiprocessing.eclass +++ b/eclass/multiprocessing.eclass @@ -96,7 +96,7 @@ get_nproc() { # no way to represent infinity, we return ${inf} (defaults to 999) if the user # has -j without a number. makeopts_jobs() { - [[ $# -eq 0 ]] && set -- ${MAKEOPTS} + [[ $# -eq 0 ]] && set -- "${MAKEOPTS}" # This assumes the first .* will be more greedy than the second .* # since POSIX doesn't specify a non-greedy match (i.e. ".*?"). local jobs=$(echo " $* " | sed -r -n \ @@ -117,7 +117,7 @@ makeopts_jobs() { # If no limit is specified or --load-average is used without a number, ${inf} # (defaults to 999) is returned. makeopts_loadavg() { - [[ $# -eq 0 ]] && set -- ${MAKEOPTS} + [[ $# -eq 0 ]] && set -- "${MAKEOPTS}" # This assumes the first .* will be more greedy than the second .* # since POSIX doesn't specify a non-greedy match (i.e. ".*?"). local lavg=$(echo " $* " | sed -r -n \ |