Gentoo Archives: gentoo-dev

From: Fabian Groffen <grobian@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Portage einfo, elog... output format change
Date: Thu, 30 Sep 2021 06:40:49
Message-Id: YVVb4/lWQ7rQj4E1@gentoo.org
In Reply to: [gentoo-dev] [RFC] Portage einfo, elog... output format change by "Michał Górny"
1 Hi,
2
3 Would it be possible to have some switch (e.g. --style=legacy) that
4 controls this new vs. the old behaviour? Would perhaps allow
5 applications that parse the output to work via setting this in the
6 global opts.
7
8 In addition, much like the colour map, how do you see this change in
9 light of eclasses, init-scripts, etc. that also use the same scheme as
10 Portage at the moment? Would you expect to change those too at some
11 point?
12
13 Final question, am I understanding correctly that normal lines are not
14 prefixed with something? Would it be, for consistency, alignment, and
15 certainty of selecting rows something to use a prefix for those lines
16 too (assuming they aren't at this point)?
17
18 Thanks,
19 Fabian
20
21 On 28-09-2021 17:36:25 +0200, Michał Górny wrote:
22 > Hi, everyone.
23 >
24 > I know I'm going to regret asking this... but I've prepared a change to
25 > the Portage output format and I think it asks for a wider discussion
26 > than internally in Portage team.
27 >
28 > The primary problem with the current output format is that different
29 > kinds of messages differ only in color. This makes them
30 > indistinguishable without colors and hard to grep. ago's been asking
31 > for a better way to grep for QA warnings and this is pretty much what
32 > motivated me to do this.
33 >
34 > The proposed new format distinguished message types both using colors
35 > and strings. This is roughly inspired by Xorg logs. For example,
36 > instead of:
37 >
38 > * some message
39 > * other message
40 > * hell if i know what this is
41 >
42 > You get:
43 >
44 > [WW] some message
45 > [EE] other message
46 > [QA] hell if i know what this is
47 >
48 > I've also added more colors to explicitly distinguish einfo from elog,
49 > and ewarn from eqawarn. Then, I've replaced most of '>>>' and '!!!'
50 > used by Portage with four-character versions to keep messages aligned.
51 > The 'zings' used for merging files remain three-character, so now it's
52 > easily possible to distinguish messages from installed file list.
53 >
54 > The PR doing this is: https://github.com/gentoo/portage/pull/759
55 >
56 > Example screenshot:
57 > https://user-images.githubusercontent.com/110765/135119090-16e9599d-1b0f-41b8-a965-a55577183ffd.png
58 >
59 > --
60 > Best regards,
61 > Michał Górny
62 >
63 >
64 >
65
66 --
67 Fabian Groffen
68 Gentoo on a different level

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies