Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: readme.gentoo.eclass: Add a DISABLE_AUTOFORMATTING variable
Date: Thu, 31 Jan 2013 20:43:57
Message-Id: pan.2013.01.31.20.43.26@cox.net
In Reply to: Re: [gentoo-dev] readme.gentoo.eclass: Add a DISABLE_AUTOFORMATTING variable by Dan Douglas
1 Dan Douglas posted on Thu, 31 Jan 2013 09:22:04 -0600 as excerpted:
2
3 > On Sunday, January 27, 2013 03:00:21 PM Pacho Ramos wrote:
4 >> [Discussion of DOC_CONTENTS var]
5 >>
6 > Why does this eclass even exist? Everything that it does can be done
7 > directly in an ebuild in a couple lines of code, except in a much less
8 > ugly manner. It doesn't help to generalize anything. If you want to copy
9 > a file and call dodoc then just do it, don't write a pointless wrapper
10 > that people then have to go and look up what it does in order to read
11 > your ebuilds.
12
13 You appear to be missing the point. The goal of the eclass isn't to copy
14 a file; as you say, that's covered. Instead, the current problem is the
15 common PKG_POSTINST messages that appear time and time again as people
16 upgrade, that are important the first time and for reference, but after
17 the first time, they're mostly just noise that users learn to ignore as
18 they've seen them many times before. Of course, ignoring such messages
19 becomes a problem when an ebuild actually prints something new and
20 useful, and VERY important (like reconfigure before you reboot or your
21 reboot won't go well!), as the maintainer now has no way to get THOSE
22 messages across.
23
24 So we get solutions like enews, and PKG_PRETEND, and ebuilds requiring
25 I_KNOW_WHAT_I_AM_DOING vars, etc, so they don't end up with unbootable
26 systems because they ignored the one important new message in all the
27 "noise" of messages they'd read a dozen times over, already.
28
29 But arguably, those are solutions to different problems. The real
30 problem here is that we repeat the same messages every time a package is
31 installed, until they're just "noise" that many users eventually simply
32 ignore, leaving package maintainers without a /reasonable/ way to
33 communicate the really important stuff.
34
35 That's the problem this eclass is trying to solve, providing a(n eclass
36 standardized) way for maintainers to print important messages the first
37 time they apply, but also to log them to a common location for reference
38 purposes so a user can go back and look them up a year and several
39 updates later, if for example they mistakenly restored an old copy from
40 backup, and end up needing to redo whatever once again.
41
42 Basically, a better elog.
43
44 It seems to have generally been agreed that such functionality would be
45 useful and should be standardized in an eclass (or new EAPI, but an eclass
46 is faster to deploy if it does the job). Now the discussion is centering
47 around getting it right. Formatting the messages handed to it by default
48 or not. Cleaning up the proposed code. Tweaking for corner cases not
49 yet covered but easily covered with a small change now before there's 200
50 packages calling it that must be changed if the way it's called changes
51 slightly to accommodate that corner-case. Etc.
52
53 > Funnily, looking at the implementation of elog, it appears to already
54 > mangle its input by a pass of `echo -e', pointlessly reading lines and
55 > joining them back together again repeatedly. This is just horrible! I
56 > don't even...
57
58 So you saw the comparison to elog, handling a message given it, and
59 /still/ missed that the eclass was to create a NEW file in a standardized
60 location, putting into it the content passed in, not simply copy an
61 existing file? Missed the forest for all the trees. =:^)
62
63 --
64 Duncan - List replies preferred. No HTML msgs.
65 "Every nonfree program has a lord, a master --
66 and if you use the program, he is your master." Richard Stallman