Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: man/, pym/_emerge/
Date: Thu, 29 Nov 2012 07:54:03
Message-Id: 1354175608.c74a19691f5cbc0ec070d5fd4ffe1983bde05a09.zmedico@gentoo
1 commit: c74a19691f5cbc0ec070d5fd4ffe1983bde05a09
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 29 07:52:49 2012 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 29 07:53:28 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c74a1969
7
8 emerge: add --quiet-fail for bug #440982
9
10 ---
11 man/emerge.1 | 11 +++++++++--
12 pym/_emerge/Scheduler.py | 3 ++-
13 pym/_emerge/main.py | 10 ++++++++++
14 3 files changed, 21 insertions(+), 3 deletions(-)
15
16 diff --git a/man/emerge.1 b/man/emerge.1
17 index a6c20a9..850a241 100644
18 --- a/man/emerge.1
19 +++ b/man/emerge.1
20 @@ -1,4 +1,4 @@
21 -.TH "EMERGE" "1" "Oct 2012" "Portage VERSION" "Portage"
22 +.TH "EMERGE" "1" "Nov 2012" "Portage VERSION" "Portage"
23 .SH "NAME"
24 emerge \- Command\-line interface to the Portage system
25 .SH "SYNOPSIS"
26 @@ -635,7 +635,8 @@ output from portage's displays.
27 .BR "\-\-quiet\-build [ y | n ]"
28 Redirect all build output to logs alone, and do not display it on
29 stdout. If a build failure occurs for a single package, the build
30 -log will be automatically displayed on stdout. If there are multiple
31 +log will be automatically displayed on stdout (unless the
32 +\fI\-\-quiet\-fail\fR option is enabled). If there are multiple
33 build failures (due to options like \-\-keep\-going or \-\-jobs),
34 then the content of the log files will not be displayed, and instead
35 the paths of the log files will be displayed together with the
36 @@ -644,6 +645,12 @@ Note that interactive packages currently force all build output to
37 be displayed on stdout. This issue can be temporarily avoided
38 by specifying \fI\-\-accept\-properties=\-interactive\fR.
39 .TP
40 +.BR "\-\-quiet\-fail [ y | n ]"
41 +Suppresses display of the build log on stdout when build output is hidden
42 +due to options such as \fI\-\-jobs\fR, \fI\-\-quiet\fR, or
43 +\fI\-\-quiet\-build\fR. Only the die message and the path of the build log
44 +will be displayed on stdout.
45 +.TP
46 .BR "\-\-quiet\-repo\-display"
47 In the package merge list display, suppress ::repository output, and
48 instead use numbers to indicate which repositories package come from.
49
50 diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
51 index 708af12..6a49497 100644
52 --- a/pym/_emerge/Scheduler.py
53 +++ b/pym/_emerge/Scheduler.py
54 @@ -1065,7 +1065,8 @@ class Scheduler(PollScheduler):
55 printer = portage.output.EOutput()
56 background = self._background
57 failure_log_shown = False
58 - if background and len(self._failed_pkgs_all) == 1:
59 + if background and len(self._failed_pkgs_all) == 1 and \
60 + self.myopts.get('--quiet-fail', 'n') != 'y':
61 # If only one package failed then just show it's
62 # whole log for easy viewing.
63 failed_pkg = self._failed_pkgs_all[-1]
64
65 diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
66 index be5a5ca..cdadbec 100644
67 --- a/pym/_emerge/main.py
68 +++ b/pym/_emerge/main.py
69 @@ -139,6 +139,7 @@ def insert_optional_args(args):
70 '--package-moves' : y_or_n,
71 '--quiet' : y_or_n,
72 '--quiet-build' : y_or_n,
73 + '--quiet-fail' : y_or_n,
74 '--rebuild-if-new-slot': y_or_n,
75 '--rebuild-if-new-rev' : y_or_n,
76 '--rebuild-if-new-ver' : y_or_n,
77 @@ -541,6 +542,12 @@ def parse_opts(tmpcmdline, silent=False):
78 "choices" : true_y_or_n,
79 },
80
81 + "--quiet-fail": {
82 + "help" : "suppresses display of the build log on stdout",
83 + "type" : "choice",
84 + "choices" : true_y_or_n,
85 + },
86 +
87 "--rebuild-if-new-slot": {
88 "help" : ("Automatically rebuild or reinstall packages when slot/sub-slot := "
89 "operator dependencies can be satisfied by a newer slot, so that "
90 @@ -782,6 +789,9 @@ def parse_opts(tmpcmdline, silent=False):
91 if myoptions.quiet_build in true_y:
92 myoptions.quiet_build = 'y'
93
94 + if myoptions.quiet_fail in true_y:
95 + myoptions.quiet_fail = 'y'
96 +
97 if myoptions.rebuild_if_new_slot in true_y:
98 myoptions.rebuild_if_new_slot = 'y'