Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/, man/
Date: Mon, 17 Aug 2020 03:50:36
Message-Id: 1597636095.8ad29c19c1a3ac8529c5c78534769d2771964bcb.zmedico@gentoo
1 commit: 8ad29c19c1a3ac8529c5c78534769d2771964bcb
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 15 19:15:37 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 17 03:48:15 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8ad29c19
7
8 emerge: Add short -l option for --load-average (bug 699256)
9
10 Add a short -l option for --load-average just like make(1) has.
11
12 Bug: https://bugs.gentoo.org/699256
13 Reviewed-by: Brian Dolbec <dolsen <AT> gentoo.org>
14 Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org>
15 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
16
17 lib/_emerge/main.py | 2 ++
18 man/emerge.1 | 2 +-
19 2 files changed, 3 insertions(+), 1 deletion(-)
20
21 diff --git a/lib/_emerge/main.py b/lib/_emerge/main.py
22 index 5aac451fe..975738762 100644
23 --- a/lib/_emerge/main.py
24 +++ b/lib/_emerge/main.py
25 @@ -171,6 +171,7 @@ def insert_optional_args(args):
26 short_arg_opts = {
27 'D' : valid_integers,
28 'j' : valid_integers,
29 + 'l' : valid_floats,
30 }
31
32 # Don't make things like "-kn" expand to "-k n"
33 @@ -542,6 +543,7 @@ def parse_opts(tmpcmdline, silent=False):
34 },
35
36 "--load-average": {
37 + "shortopt" : "-l",
38
39 "help" :"Specifies that no new builds should be started " + \
40 "if there are other builds running and the load average " + \
41
42 diff --git a/man/emerge.1 b/man/emerge.1
43 index 9f77d1fa2..fe7d05a21 100644
44 --- a/man/emerge.1
45 +++ b/man/emerge.1
46 @@ -688,7 +688,7 @@ dependencies are recalculated for remaining packages and any with
47 unsatisfied dependencies are automatically dropped. Also see
48 the related \fB\-\-skipfirst\fR option.
49 .TP
50 -.BR "\-\-load\-average [LOAD]"
51 +.BR \-l\ [LOAD] ", " \-\-load\-average[=LOAD]
52 Specifies that no new builds should be started if there are other builds
53 running and the load average is at least LOAD (a floating-point number).
54 With no argument, removes a previous load limit.