Gentoo Archives: gentoo-dev

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