Gentoo Archives: gentoo-dev

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

Attachments

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

Replies

Subject Author
Re: [Fwd: Re: [gentoo-dev] Package notices] Chris Gianelloni <wolf31o2@g.o>
Re: [Fwd: Re: [gentoo-dev] Package notices] Thomas de Grenier de Latour <degrenier@×××××××××××.fr>
[gentoo-dev] Package notices Nicholas Jones <carpaski@g.o>