Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] have portage be quiet by default
Date: Tue, 15 Nov 2011 20:23:36
Message-Id: 4EC2C9C1.9000202@gentoo.org
In Reply to: Re: [gentoo-dev] have portage be quiet by default by Alex Alexander
1 On 11/15/2011 04:27 AM, Alex Alexander wrote:
2 > On Mon, Nov 14, 2011 at 07:19:35AM -0800, Zac Medico wrote:
3 >> On 11/14/2011 12:25 AM, Alex Alexander wrote:
4 >>> On Sun, Nov 13, 2011 at 05:59:21PM -0800, Zac Medico wrote:
5 >>>> Well, it's much easier to gather interest and get feedback if we deploy
6 >>>> the change and ask questions later.
7 >>>
8 >>> What if we tried solving this problem by providing more options instead
9 >>> of trying to guess what the users want? :)
10 >>>
11 >>> Imagine the following output (when jobs == 1):
12 >>>
13 >>>>>> Verifying ebuild manifests
14 >>>>>> Emerging (1 of 1) www-client/chromium-16.0.912.36
15 >>>>>> Quiet building enabled. Enable for [P]ackage or [S]ession. [L]earn more.
16 >>>>>> Jobs: 0 of 1 complete, 1 running Load avg: 0.23, 0.18, 0.10
17 >>>
18 >>> Pressing P would only show the log for the actively built package.
19 >>> Pressing S would show all the logs for this session, starting with the
20 >>> active one.
21 >>>
22 >>> Pressing L would print out a short set of instructions, something
23 >>> like:
24 >>>
25 >>> "To make portage output easier to track and understand, --quiet-build
26 >>> has been enabled by default. You may restore the old, verbose behavior
27 >>> temporarily by using the P and S commands, or permanently by adding
28 >>> '--quiet-build=n' to your make.conf's EMERGE_DEFAULT_OPTS."
29 >>>
30 >>> I believe many users would appreciate the ability to output logs on
31 >>> demand. :)
32 >>
33 >> I think that would be an interesting option. We could put stdin in raw
34 >> mode, like dispatch-conf does, in order to read single characters of
35 >> input instead of whole lines.
36 >>
37 >> I can imagine that this option wouldn't be desired by some people, if
38 >> only because emerge would consume all keystrokes from the input buffer.
39 >> In the past we had a few portage releases that consumed keystrokes like
40 >> that (it was part of the support for interactive ebuilds), and I recall
41 >> someone (I think it was grobian) complaining because he had a habit of
42 >> typing his next shell command before emerge had completed.
43 >
44 > As long as everything is optional, I don't think we'll have any
45 > reasonable complaints.
46 >
47 > The stdin raw mode would only be enabled when --quiet-build=y and
48 > --jobs=1. Any other combination would switch to standard mode and we
49 > could also introduce an --allow-options=[y/n] (or similar) parameter for
50 > those who want to completely disable the feature.
51 >
52 > I'm confident many users that are currently against quiet-build would
53 > consider it if they were provided with these options :)
54
55 I don't know, some people are hard to please. :)
56
57 > Would it be difficult to implement?
58
59 It doesn't seem very difficult. We should be able to use the poll loop
60 to handle the input, so it won't require a separate thread.
61
62 I wouldn't be opposed to adding support for something like this. Since
63 I'm not really interested in using an interface like that myself, so I
64 don't feel inspired to implement it myself.
65 --
66 Thanks,
67 Zac