public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Package notices
@ 2004-09-01 19:42 Eldad Zack
  2004-09-01 21:05 ` William Hubbs
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Eldad Zack @ 2004-09-01 19:42 UTC (permalink / raw
  To: Gentoo-Dev

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

Hey Guys,

I've got an idea to implement package notices, as opposed to
outputing these important messages to stdout using e{info,warn,error}.

The idea is VERY simple: write the message to a file (say,
/var/portage/notices/{P}) and have a utility to read and delete these
messages. Maybe even build this functionality into etc-config.
(Maybe mail these messages to a configured address?)

For ease-of-use I propose adding a simple wrapper command ("enotice" or
"notice") that would take care of writing into the correct file.

If this looks like a good idea I'll move on and punch out the matching
code.

Comments? Ideas?

-- 

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread
* [Fwd: Re: [gentoo-dev] Package notices]
@ 2004-09-02 20:12 Eldad Zack
  2004-09-03  5:10 ` [gentoo-dev] Package notices Nicholas Jones
  0 siblings, 1 reply; 15+ messages in thread
From: Eldad Zack @ 2004-09-02 20:12 UTC (permalink / raw
  To: Gentoo-Dev

[-- Attachment #1: Type: text/plain, Size: 2028 bytes --]

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.

-- 

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-09-04 12:55 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-01 19:42 [gentoo-dev] Package notices Eldad Zack
2004-09-01 21:05 ` William Hubbs
2004-09-01 22:01   ` Thomas de Grenier de Latour
2004-09-02 16:46 ` purslow
2004-09-02 18:06   ` Anton Starikov
2004-09-02 19:59   ` N. Owen Gunden
2004-09-02 18:46 ` Christian Gut
2004-09-02 18:56   ` Alexander Gretencord
  -- strict thread matches above, loose matches on Subject: below --
2004-09-02 20:12 [Fwd: Re: [gentoo-dev] Package notices] Eldad Zack
2004-09-03  5:10 ` [gentoo-dev] Package notices Nicholas Jones
2004-09-03 14:00   ` Pablo Villalba
2004-09-03 12:47     ` Jason Stubbs
2004-09-03 15:10   ` Eldad Zack
2004-09-03 14:15     ` Jason Stubbs
2004-09-03 16:15       ` Eldad Zack
2004-09-04 12:55   ` Eldad Zack

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox