Gentoo Archives: gentoo-dev

From: Ryan Hill <rhill@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: RFC: intel-sdp-r1.eclass
Date: Wed, 17 Feb 2016 04:48:47
Message-Id: 20160216224808.47f88ab1@tundra.gateway.pace.com
In Reply to: Re: [gentoo-dev] RFC: intel-sdp-r1.eclass by "Michał Górny"
1 On Mon, 15 Feb 2016 15:35:12 +0100
2 Michał Górny <mgorny@g.o> wrote:
3 > On Mon, 15 Feb 2016 14:37:41 +0100
4 > "Justin Lecher (jlec)" <jlec@g.o> wrote:
5 > > On 15/02/16 13:59, Michał Górny wrote:
6 > > > On Mon, 15 Feb 2016 09:16:53 +0100
7 > > > "Justin Lecher (jlec)" <jlec@g.o> wrote:
8 > > >> _isdp_big-warning() {
9 > > >> debug-print-function ${FUNCNAME} "${@}"
10 > > >> case ${1} in
11 > > >> pre-check )
12 > > >> echo ""
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
18 to separate out the "important" messages from the generic
19 spew put out by the package manager/eclasses/build system
20 that you have no control over.
21
22 If you have several different messages you want a blank space
23 in between them so you can use e* to create whitespace within
24 the message to avoid the wall of text syndrome while still
25 making it clear where it begins and ends.
26
27 Let's take openrc for example (not picking on anyone, it's just
28 the last package with a bunch of different post-install messages
29 I happened to emerge).
30
31 Currently:
32
33 * The OpenRC dependency data has already been migrated.
34 * Caching service dependencies ... [ ok ]
35 * In this version of OpenRC, the loopback interface no longer
36 * satisfies the net virtual.
37 * If you have services now which do not start because of this,
38 * They can be fixed by adding rc_need="!net"
39 * to the /etc/conf.d/<servicename> file.
40 * You should also file a bug against the service asking that
41 * need net be dropped from the dependencies.
42 * The bug you file should block the following tracker:
43 * https://bugs.gentoo.org/show_bug.cgi?id=439092
44 *
45 * Bug https://bugs.gentoo.org/show_bug.cgi?id=427996 was not
46 * fixed correctly in earlier versions of OpenRC.
47 * The correct fix is implemented in this version, but that
48 * means netmount needs to be added to the default runlevel if
49 * you are using nfs file systems.
50 *
51 * You should now update all files in /etc, using etc-update
52 * or equivalent before restarting any services or this host.
53
54 This is pretty much unreadable to me.
55
56 Better:
57
58 * The OpenRC dependency data has already been migrated.
59 * Caching service dependencies ... [ ok ]
60 *
61 * In this version of OpenRC, the loopback interface no longer
62 * satisfies the net virtual.
63 *
64 * If you have services now which do not start because of this,
65 * They can be fixed by adding rc_need="!net"
66 * to the /etc/conf.d/<servicename> file.
67 *
68 * You should also file a bug against the service asking that
69 * need net be dropped from the dependencies.
70 *
71 * The bug you file should block the following tracker:
72 * https://bugs.gentoo.org/show_bug.cgi?id=439092
73 *
74 * Bug https://bugs.gentoo.org/show_bug.cgi?id=427996 was not
75 * fixed correctly in earlier versions of OpenRC.
76 *
77 * The correct fix is implemented in this version, but that
78 * means netmount needs to be added to the default runlevel if
79 * you are using nfs file systems.
80 *
81 * You should now update all files in /etc, using etc-update
82 * or equivalent before restarting any services or this host.
83
84 This is better but you still have to read the whole thing to
85 make sure you didn't miss anything important.
86
87 Even better:
88
89 * The OpenRC dependency data has already been migrated.
90 * Caching service dependencies ... [ ok ]
91
92 * In this version of OpenRC, the loopback interface no longer
93 * satisfies the net virtual.
94 *
95 * If you have services now which do not start because of this,
96 * They can be fixed by adding rc_need="!net"
97 * to the /etc/conf.d/<servicename> file.
98 *
99 * You should also file a bug against the service asking that
100 * need net be dropped from the dependencies.
101 * The bug you file should block the following tracker:
102 *
103 * https://bugs.gentoo.org/show_bug.cgi?id=439092
104
105 * Bug https://bugs.gentoo.org/show_bug.cgi?id=427996 was not
106 * fixed correctly in earlier versions of OpenRC.
107 *
108 * The correct fix is implemented in this version, but that
109 * means netmount needs to be added to the default runlevel if
110 * you are using nfs file systems.
111
112 * You should now update all files in /etc, using etc-update
113 * or equivalent before restarting any services or this host.
114
115 Here I can read the first line of the second block and know I can
116 skip the next 12 lines without missing anything. The next block
117 isn't worded the greatest, but that's beside the point. And now
118 I get an important message at the end that I previously never
119 noticed because tl;dr.
120
121 You're right that using echo means the whitespace doesn't get
122 saved by the elog system. A while back someone proposed we
123 add espace for exactly this reason but IIRC they were laughed
124 down, which is a shame.
125
126 --

Replies

Subject Author
Re: [gentoo-dev] Re: RFC: intel-sdp-r1.eclass "Michał Górny" <mgorny@g.o>