Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o, Duncan <1i5t5.duncan@×××.net>
Subject: Re: [gentoo-dev] Re: RFC: intel-sdp-r1.eclass
Date: Wed, 17 Feb 2016 11:20:53
Message-Id: 64578254-F40A-44CF-AD5F-49C28BFCBA8B@gentoo.org
In Reply to: [gentoo-dev] Re: RFC: intel-sdp-r1.eclass by Duncan <1i5t5.duncan@cox.net>
1 Dnia 17 lutego 2016 11:53:32 CET, Duncan <1i5t5.duncan@×××.net> napisał(a):
2 >Michał Górny posted on Wed, 17 Feb 2016 07:47:06 +0100 as excerpted:
3 >
4 >> On Tue, 16 Feb 2016 22:48:08 -0600 Ryan Hill <rhill@g.o>
5 >wrote:
6 >>
7 >>> On Mon, 15 Feb 2016 15:35:12 +0100 Michał Górny <mgorny@g.o>
8 >>> wrote:
9 >>> > On Mon, 15 Feb 2016 14:37:41 +0100 "Justin Lecher (jlec)"
10 >>> > <jlec@g.o> wrote:
11 >>> > > On 15/02/16 13:59, Michał Górny wrote:
12 >
13 >>> > > > Don't mix echo with ewarn.
14 >>> > > Why?
15 >>> > Because they won't go through the same output channels.
16 >>>
17 >>> That's kinda the point. You want a blank (unstarred) space to
18 >separate
19 >>> out the "important" messages from the generic spew put out by the
20 >>> package manager/eclasses/build system that you have no control over.
21 >>
22 >> This is not just that. Different output channels mean that:
23 >
24 >> - There is no guarantee of correct output order! The empty lines may
25 >> move randomly over the text.
26 >
27 >Good point! (Of course the others are too, but this one could be
28 >particularly damaging to the intended communication.)
29 >
30 >>> If you have several different messages you want a blank space in
31 >>> between them so you can use e* to create whitespace within the
32 >message
33 >>> to avoid the wall of text syndrome while still making it clear where
34 >it
35 >>> begins and ends.
36 >
37 >>> You're right that using echo means the whitespace doesn't get saved
38 >by
39 >>> the elog system. A while back someone proposed we add espace for
40 >>> exactly this reason but IIRC they were laughed down, which is a
41 >shame.
42 >>
43 >> So... to summarize your point. You shouldn't use the correct function
44 >> that is saved in elog which is primary way of getting info because
45 >you
46 >> find it more convenient to have empty non-'starred' lines that don't
47 >> actually get to elog and make elog a mess?
48 >>
49 >> If you really don't like empty 'starred' lines (and I actually like
50 >them
51 >> since they make separation between packages cleaner), why not submit
52 >a
53 >> patch for Portage and make 'elog' with no arguments output log line
54 >> without a star? That's a trivial solution that doesn't require extra
55 >> functions for the sake of inventing elogspace, ewarnspace, ...
56 >
57 >It is at least possible to use say blank ewarn between elog lines, or
58 >the
59 >reverse, so while there's no totally blank separator, there's at least
60 >a
61 >different color to the star on the starred-blank-line separator.
62 >
63 >Similarly, if there's more than one "topic" to the messages, and
64 >they're
65 >of different severity, the severities can be interspersed to get color
66 >separation.
67 >
68 >I believe I've seen both techniques used to good effect in a few
69 >packages
70 >in the past, but I can't name any off the top of my head.
71
72 This is mixing channels again. Someone may decide to output warnings separately from elogs. Or not output elogs at all.
73
74
75 --
76 Best regards,
77 Michał Górny (by phone)