Gentoo Archives: gentoo-portage-dev

From: Marius Mauch <genone@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] elog-base
Date: Mon, 24 Oct 2005 06:47:20
Message-Id: 435B594A.6040408@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] elog-base by Jason Stubbs
1 Jason Stubbs wrote:
2 > On Sunday 23 October 2005 00:08, Marius Mauch wrote:
3 >
4 >>- needs better integration of isolated-functions.sh, probably should be
5 >>a separate patch (Brian?)
6 >
7 > Not sure what you mean by better as I'm happy with the current method. Other
8 > than the hardcoded path, it should work fine...
9
10 The unconditional call to set_colors for example.
11
12 > --- pym/portage.py (revision 2155)
13 > +++ pym/portage.py (working copy)
14 >
15 > + # exploit listdir() file order so we process log entries in cronological order
16 > + mylogfiles.reverse()
17 >
18 > Exploiting listdir()'s ordering is a bad idea. A bugfix to it could quite
19 > possibly change the ordering returned. Looking at cacheddir(), results are
20 > current being returned in filesystem order.
21 >
22 > Seeing that interspersed einfo and ewarn calls will be separated by class
23 > anyway, is there any need to play with the ordering at all? As far as the
24 > rest of the code goes, it only affects whether INFO comes before WARN or
25 > not. Phases themselves come out in the correct order regardless.
26
27 Hmm, not sure myself, _might_ be a leftover from an older prototype
28 version that didn't have the separation. If someone else can verify
29 (can't do it myself atm) that the output is (mostly) unaffected by
30 removing that hack no objection here.
31
32 > print "!!! Error while importing logging module %s:" % s
33 > would be better in case the exception doesn't contain the module name.
34
35 Cosmetics, no objection here.
36
37 > --- pym/portage_const.py (revision 2155)
38 > +++ pym/portage_const.py (working copy)
39 >
40 > +EBUILD_PHASES = "setup unpack compile test install preinst postinst prerm postrm"
41 >
42 > This constant is can only ever be used as a list. It should be defined
43 > that way. It might also be worth combining this list into the keys of
44 > actionmap_deps.
45
46 *shrug*, doesn't really matter to me.
47
48 > +esyslog() {
49 > + local pri=
50 > + local tag=
51 > +
52 > + if [ -x /usr/bin/logger ]
53 > + then
54 > + pri="$1"
55 > + tag="$2"
56 > +
57 > + shift 2
58 > + [ -z "$*" ] && return 0
59 > +
60 > + /usr/bin/logger -p "${pri}" -t "${tag}" -- "$*"
61 > + fi
62 > +
63 > + return 0
64 > +}
65 >
66 > What's this one for? Ebuilds should never be logging to syslog directly...
67
68 That was predefined in isolated-functions.sh, so I'd guess it's
69 something from the old functions.sh, it has nothing todo with elog
70 (another thing I meant with "better isolated-functions.sh integration").
71
72 Marius
73 --
74 gentoo-portage-dev@g.o mailing list