1 |
On Wednesday 26 October 2005 23:24, Thomas de Grenier de Latour wrote: |
2 |
> On Sun, 23 Oct 2005 11:54:07 +0900 |
3 |
> |
4 |
> Jason Stubbs <jstubbs@g.o> wrote: |
5 |
> > Seeing that interspersed einfo and ewarn calls will be separated |
6 |
> > by class anyway, is there any need to play with the ordering at |
7 |
> > all? |
8 |
> |
9 |
> That's also one thing i don't understand with elog: why does it |
10 |
> separate messages in many files instead of using a single one with |
11 |
> a simple markup? In the implementation of a similar feature i had |
12 |
> done as part of bug #37491, i was using something like: |
13 |
|
14 |
I like the markup idea to keep ordering. |
15 |
|
16 |
> ... |
17 |
> [ebuild:/path/to/foo-bar-1.2.ebuild package:cat/foo-bar-1.2 |
18 |
> step:post_inst date:1234567890] |
19 |
> [emessage:info] |
20 |
> You can try to run "foo-bar --break-things", it's fun. |
21 |
> [emessage:warn] |
22 |
> Don't do it too often tho, it hurts. |
23 |
> [emessage:info] |
24 |
> Also, run "foo-bar --check-things" from time to time. |
25 |
> ... |
26 |
> |
27 |
> It was really easy to parse and pretty-print, and was giving |
28 |
> messages in the right order. And in some cases, it matters: for |
29 |
> instance, the following would have been missleading: |
30 |
> * You can try to run "foo-bar --destroy-things", it's fun. |
31 |
> * Also, run "foo-bar --check-things" from time to time. |
32 |
> * Don't do it too often tho, it hurts. |
33 |
|
34 |
Personally, I think that using the einfo and ewarn classes purely as methods |
35 |
to get different text formatting is bad practice. Seeing as I can't think of |
36 |
a case where interspersing einfo and ewarn to convey a single message is used |
37 |
beyond formatting, I don't really mind that things come out unordered though. |
38 |
|
39 |
> Also, one thing i had seen when working on this old patches was that |
40 |
> einfos from eclasses really clutter the logs you get. I mean, few |
41 |
> packages don't have at least an "Applying something.patch" or a |
42 |
> "Cleaning orphan /usr/lib/python/plopplop.pyo", etc. I think it |
43 |
> would be a good idea to provide some einfo-like functions which do |
44 |
> not write to logs, just for eclass writers who want color when they |
45 |
> feel the need to tell the world what their code is currently doing. |
46 |
> That would reduce a lot the number of packages with false-positive |
47 |
> elogs. |
48 |
|
49 |
I'm for that too. |
50 |
|
51 |
-- |
52 |
Jason Stubbs |
53 |
-- |
54 |
gentoo-portage-dev@g.o mailing list |