Gentoo Archives: gentoo-dev

From: Chris Gianelloni <wolf31o2@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [Fwd: Re: [gentoo-dev] Package notices]
Date: Thu, 02 Sep 2004 22:08:30
Message-Id: 1094163421.1055.77.camel@cgianelloni.nuvox.net
In Reply to: [Fwd: Re: [gentoo-dev] Package notices] by Eldad Zack
1 On Thu, 2004-09-02 at 16:12, Eldad Zack wrote:
2 > On Thu, 2004-09-02 at 21:56, Alexander Gretencord wrote:
3 > > On Thursday 02 September 2004 20:46, Christian Gut wrote:
4 > > > another idea: simply hand them over to syslog. This way they get mailed
5 > > > to the admin and are there for later reference.
6 > >
7 > > Just read Bug #11359 (http://bugs.gentoo.org/show_bug.cgi?id=11359). This has
8 > > also been discussed there and is only an option for already installed
9 > > systems.
10 >
11 > > In short: The basic mechnism has to work without eMail and without syslog or
12 > > any other fancy stuff. Just think of a bootstrap build, where no such thing
13 > > is available.
14 >
15 > What I had in mind could be deployed today, without needing to patch
16 > portage.
17 > Basically, it could be implemented using a new eclass or just adding the
18 > enotice function to eutils - I wouldn't want all the einfos logged,
19 > anyway. (patching notices? no thanks.)
20 >
21 > What I would like, would be messages from packages like cacti.
22 > enotice itself will write into the file and emit an einfo.
23 >
24 > This is what I had in mind:
25 >
26 > # void enotice(char* message)
27 > #
28 > # write informative message (with a newline) into notice log.
29 > # also emits einfo.
30 > #
31 > enotice() {
32 > einfo "${*}"
33 >
34 > if [ -n "${ENOTICE_DIR}" ]
35 > then
36 > # Not checking if it ${ENOTICE_DIR} exists since
37 > # install does stat and stops if it exists.
38 > install ${ENOTICE_DIR}
39 >
40 > echo "${*}" >> ${ENOTICE_DIR}/${PF}
41 > fi
42 >
43 > return 0
44 > }
45 >
46 > To make it work it only requires that ENOTICE_DIR would be set in
47 > make.conf.
48 >
49 > It is also sandbox-friendly, since it is a regular file as far as
50 > portage concerns - and that also makes it binary-friendly. The notices
51 > will be included in the binary tbz2.
52 >
53 > The external utility to read the messages is also pretty
54 > straight-forward to write.
55 >
56 > I'd like to hear from other developers if they think it is useful and if
57 > they plan to use it...
58 > I would also like to go ahead and use it for any ebuilds I currently
59 > maintain.
60
61 It needs to be able to support the 3 levels of enotices: einfo, ewarn,
62 and ecrit.
63
64 --
65 Chris Gianelloni
66 Release Engineering - Operations/QA Manager
67 Games - Developer
68 Gentoo Linux
69
70 Is your power animal a penguin?

Attachments

File name MIME type
signature.asc application/pgp-signature