1 |
Bug: https://bugs.gentoo.org/630626 |
2 |
--- |
3 |
v2: Reject "-l 2.3.4" |
4 |
|
5 |
eclass/multiprocessing.eclass | 2 +- |
6 |
1 file changed, 1 insertion(+), 1 deletion(-) |
7 |
|
8 |
diff --git a/eclass/multiprocessing.eclass b/eclass/multiprocessing.eclass |
9 |
index 50368e35ea93..b6e92976f73e 100644 |
10 |
--- a/eclass/multiprocessing.eclass |
11 |
+++ b/eclass/multiprocessing.eclass |
12 |
@@ -120,7 +120,7 @@ makeopts_loadavg() { |
13 |
# This assumes the first .* will be more greedy than the second .* |
14 |
# since POSIX doesn't specify a non-greedy match (i.e. ".*?"). |
15 |
local lavg=$(echo " $* " | sed -r -n \ |
16 |
- -e 's:.*[[:space:]](-[a-z]*l|--(load-average|max-load)[=[:space:]])[[:space:]]*([0-9]+|[0-9]+\.[0-9]+).*:\3:p' \ |
17 |
+ -e 's:.*[[:space:]](-[a-z]*l|--(load-average|max-load)[=[:space:]])[[:space:]]*([0-9]+(\.[0-9]+)?)[[:space:]].*:\3:p' \ |
18 |
-e "s:.*[[:space:]](-[a-z]*l|--(load-average|max-load))[[:space:]].*:${2:-999}:p") |
19 |
# Default to ${inf} since the default is to not use a load limit. |
20 |
echo ${lavg:-${2:-999}} |
21 |
-- |
22 |
2.14.1 |