commit: 8ad29c19c1a3ac8529c5c78534769d2771964bcb Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Sat Aug 15 19:15:37 2020 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Mon Aug 17 03:48:15 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8ad29c19
emerge: Add short -l option for --load-average (bug 699256) Add a short -l option for --load-average just like make(1) has. Bug: https://bugs.gentoo.org/699256 Reviewed-by: Brian Dolbec <dolsen <AT> gentoo.org> Reviewed-by: Matt Turner <mattst88 <AT> gentoo.org> Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> lib/_emerge/main.py | 2 ++ man/emerge.1 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/_emerge/main.py b/lib/_emerge/main.py index 5aac451fe..975738762 100644 --- a/lib/_emerge/main.py +++ b/lib/_emerge/main.py @@ -171,6 +171,7 @@ def insert_optional_args(args): short_arg_opts = { 'D' : valid_integers, 'j' : valid_integers, + 'l' : valid_floats, } # Don't make things like "-kn" expand to "-k n" @@ -542,6 +543,7 @@ def parse_opts(tmpcmdline, silent=False): }, "--load-average": { + "shortopt" : "-l", "help" :"Specifies that no new builds should be started " + \ "if there are other builds running and the load average " + \ diff --git a/man/emerge.1 b/man/emerge.1 index 9f77d1fa2..fe7d05a21 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -688,7 +688,7 @@ dependencies are recalculated for remaining packages and any with unsatisfied dependencies are automatically dropped. Also see the related \fB\-\-skipfirst\fR option. .TP -.BR "\-\-load\-average [LOAD]" +.BR \-l\ [LOAD] ", " \-\-load\-average[=LOAD] Specifies that no new builds should be started if there are other builds running and the load average is at least LOAD (a floating-point number). With no argument, removes a previous load limit.
