1 |
On Wed, Dec 14, 2016 at 10:45 AM, Rich Freeman <rich0@g.o> wrote: |
2 |
> On Wed, Dec 14, 2016 at 10:27 AM, M. J. Everitt <m.j.everitt@×××.org> wrote: |
3 |
>> |
4 |
>> I do, but only usually if its the last package of an emerge because |
5 |
>> otherwise its lost many many thousands of lines upwards. Thank goodness |
6 |
>> for portage's savelog feature. - Actually that reminds me .. someone |
7 |
>> mentioned a useful tweak to that, with an appropriate FEATURES switch, |
8 |
>> it would categorise the output of the logging system .. must look that |
9 |
>> one up again, or poke the wiki team ....... |
10 |
>> |
11 |
> |
12 |
> IMO, emailing elogs to root should probably be the default. By all |
13 |
> means let people turn it off, but I bet a lot of people don't realize |
14 |
> it is an option. |
15 |
|
16 |
Having just looked at portage's mail code, you can't use the mail |
17 |
subsystem if you have no mailserver or sendmail binary. Instead, |
18 |
it'll just throw an error, so you couldn't have any default Portage |
19 |
configuration to mail them somewhere. The current default |
20 |
configuration appends to ${PORT_LOGDIR}/elog/summary.log with qa, log, |
21 |
warn, and error levels for every package that outputs any of these |
22 |
classes. If PORT_LOGDIR is unset, the target is |
23 |
/var/log/portage/elog/summary.log. |
24 |
|
25 |
> |
26 |
> This goes in all my make.conf files: |
27 |
> PORTAGE_ELOG_CLASSES="warn error log" |
28 |
> PORTAGE_ELOG_SYSTEM="save mail" |
29 |
> PORTAGE_ELOG_MAILURI="a@×.com smtp.server.address" |
30 |
> PORTAGE_ELOG_MAILSUBJECT="package \${PACKAGE} merged on \${HOST} with notice" |
31 |
> |
32 |
> Yes, some packages are a bit spammy and this should be fixed, but in |
33 |
> general it has prevented more headaches than it has caused. |
34 |
|
35 |
This can't really be fixed in a good way, and I'd really rather it |
36 |
wasn't anyway. A [ -z "$REPLACING_VERSIONS" ] test is only valid in |
37 |
pkg_* phases (and by PMS, REPLACING_VERSIONS doesn't have to be |
38 |
defined in pkg_pretend or pkg_setup), and in many cases, using |
39 |
REPLACING_VERSIONS in any way can be difficult to do correctly. Using |
40 |
the readme.gentoo eclass wouldn't be an awful way to go if it really |
41 |
bothers you, but you could also use mail_summary instead of mail to |
42 |
reduce the mail spam to 1 email per emerge run. |
43 |
|
44 |
-Doug |