On Thu, 2004-09-02 at 16:12, Eldad Zack wrote: > On Thu, 2004-09-02 at 21:56, Alexander Gretencord wrote: > > On Thursday 02 September 2004 20:46, Christian Gut wrote: > > > another idea: simply hand them over to syslog. This way they get mailed > > > to the admin and are there for later reference. > > > > Just read Bug #11359 (http://bugs.gentoo.org/show_bug.cgi?id=11359). This has > > also been discussed there and is only an option for already installed > > systems. > > > In short: The basic mechnism has to work without eMail and without syslog or > > any other fancy stuff. Just think of a bootstrap build, where no such thing > > is available. > > What I had in mind could be deployed today, without needing to patch > portage. > Basically, it could be implemented using a new eclass or just adding the > enotice function to eutils - I wouldn't want all the einfos logged, > anyway. (patching notices? no thanks.) > > What I would like, would be messages from packages like cacti. > enotice itself will write into the file and emit an einfo. > > This is what I had in mind: > > # void enotice(char* message) > # > # write informative message (with a newline) into notice log. > # also emits einfo. > # > enotice() { > einfo "${*}" > > if [ -n "${ENOTICE_DIR}" ] > then > # Not checking if it ${ENOTICE_DIR} exists since > # install does stat and stops if it exists. > install ${ENOTICE_DIR} > > echo "${*}" >> ${ENOTICE_DIR}/${PF} > fi > > return 0 > } > > To make it work it only requires that ENOTICE_DIR would be set in > make.conf. > > It is also sandbox-friendly, since it is a regular file as far as > portage concerns - and that also makes it binary-friendly. The notices > will be included in the binary tbz2. > > The external utility to read the messages is also pretty > straight-forward to write. > > I'd like to hear from other developers if they think it is useful and if > they plan to use it... > I would also like to go ahead and use it for any ebuilds I currently > maintain. It needs to be able to support the 3 levels of enotices: einfo, ewarn, and ecrit. -- Chris Gianelloni Release Engineering - Operations/QA Manager Games - Developer Gentoo Linux Is your power animal a penguin?