From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-dev-return-15467-arch-gentoo-dev=gentoo.org@lists.gentoo.org>
Received: (qmail 20837 invoked from network); 2 Sep 2004 20:12:24 +0000
Received: from smtp.gentoo.org (156.56.111.197)
  by lists.gentoo.org with AES256-SHA encrypted SMTP; 2 Sep 2004 20:12:24 +0000
Received: from lists.gentoo.org ([156.56.111.196] helo=parrot.gentoo.org)
	by smtp.gentoo.org with esmtp (Exim 4.34)
	id 1C2xwW-0001sK-1T
	for arch-gentoo-dev@lists.gentoo.org; Thu, 02 Sep 2004 20:12:24 +0000
Received: (qmail 18834 invoked by uid 89); 2 Sep 2004 20:12:23 +0000
Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm
Precedence: bulk
List-Post: <mailto:gentoo-dev@gentoo.org>
List-Help: <mailto:gentoo-dev-help@gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev-unsubscribe@gentoo.org>
List-Subscribe: <mailto:gentoo-dev-subscribe@gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@gentoo.org
Received: (qmail 23129 invoked from network); 2 Sep 2004 20:12:22 +0000
From: Eldad Zack <eldad@gentoo.org>
To: Gentoo-Dev <gentoo-dev@lists.gentoo.org>
Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-TrOEIz+W4KLdrZVsNpK4"
Message-Id: <1094155935.19504.40.camel@localhost>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.6 
Date: Thu, 02 Sep 2004 23:12:15 +0300
Subject: [Fwd: Re: [gentoo-dev] Package notices]
X-Archives-Salt: 41d1f842-3438-465c-8d92-a72168e345a4
X-Archives-Hash: 988f3dfcd6708de33b7a49e52b78ed60

--=-TrOEIz+W4KLdrZVsNpK4
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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.
>=20
> Just read Bug #11359 (http://bugs.gentoo.org/show_bug.cgi?id=3D11359). Th=
is has=20
> also been discussed there and is only an option for already installed=20
> systems.

> In short: The basic mechnism has to work without eMail and without syslog=
 or=20
> any other fancy stuff. Just think of a bootstrap build, where no such thi=
ng=20
> 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.

--=20

Eldad Zack <eldad@gentoo.org>
Key/Fingerprint at pgp.mit.edu, ID 0x96EA0A93

--=-TrOEIz+W4KLdrZVsNpK4
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBBN36fT+MN7JbqCpMRAr7rAJ9YMIFKuLtLwWm/wpAhwAgugMnuPgCcDbUX
j1C2cl5OY7vUan0ThPU8CLM=
=H0iE
-----END PGP SIGNATURE-----

--=-TrOEIz+W4KLdrZVsNpK4--