Jason Stubbs wrote:
On Sunday 23 October 2005 00:08, Marius Mauch wrote:

- needs better integration of isolated-functions.sh, probably should be
a separate patch (Brian?)

Not sure what you mean by better as I'm happy with the current method. Other
than the hardcoded path, it should work fine...

The unconditional call to set_colors for example.

--- pym/portage.py      (revision 2155)
+++ pym/portage.py      (working copy)

+       # exploit listdir() file order so we process log entries in 
cronological order
+       mylogfiles.reverse()

Exploiting listdir()'s ordering is a bad idea. A bugfix to it could quite
possibly change the ordering returned. Looking at cacheddir(), results are
current being returned in filesystem order.

Seeing that interspersed einfo and ewarn calls will be separated by class
anyway, is there any need to play with the ordering at all? As far as the
rest of the code goes, it only affects whether INFO comes before WARN or
not. Phases themselves come out in the correct order regardless.

Hmm, not sure myself, _might_ be a leftover from an older prototype version that didn't have the separation. If someone else can verify (can't do it myself atm) that the output is (mostly) unaffected by removing that hack no objection here.

print "!!! Error while importing logging module %s:" % s
would be better in case the exception doesn't contain the module name.

Cosmetics, no objection here.

--- pym/portage_const.py        (revision 2155)
+++ pym/portage_const.py        (working copy)

+EBUILD_PHASES                  = "setup unpack compile test install preinst 
postinst prerm postrm"

This constant is can only ever be used as a list. It should be defined
that way. It might also be worth combining this list into the keys of
actionmap_deps.

*shrug*, doesn't really matter to me.

+esyslog() {
+       local pri=
+       local tag=
+
+       if [ -x /usr/bin/logger ]
+       then
+               pri="$1"
+               tag="$2"
+
+               shift 2
+               [ -z "$*" ] && return 0
+
+               /usr/bin/logger -p "${pri}" -t "${tag}" -- "$*"
+       fi
+
+       return 0
+}

What's this one for? Ebuilds should never be logging to syslog directly...

That was predefined in isolated-functions.sh, so I'd guess it's something from the old functions.sh, it has nothing todo with elog (another thing I meant with "better isolated-functions.sh integration").

Marius
--
gentoo-portage-dev@gentoo.org mailing list

Reply via email to