public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Neil Bothwick <neil@digimed.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Can emerge play a sound on either a successful/unsuccessful build?
Date: Mon, 14 Jul 2014 13:21:10 +0100	[thread overview]
Message-ID: <20140714132110.59fd54b3@digimed.co.uk> (raw)
In-Reply-To: <53C3C884.9030100@wht.com.au>

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

On Mon, 14 Jul 2014 20:09:40 +0800, Andrew Lowe wrote:

> > register_die_hook ebuild_failed
> > ebuild_failed {
> > 	do something foreboding
> > }
> > 
> > I actually have it send an alert to my phone with Posterous but you
> > can do whatever you want.
> > 
> > I also use package.env to alert me when particularly
> > time-consuming ebuilds, like LibreOffice and Chromium, have completed
> > successfully.
> > 
> >   
> 
> Neil,
> 	This sounds interesting. Care to share one of these hooks to
> show what they actually look like?

The path to Posterous my messages take is rather convoluted, but whatever
you put in the ebuild_failed function will be executed on failure. For
the success notifications, I put this in bashrc

if [[ "${EBUILD_SUCCESS}" == "true" ]]; then
	register_success_hook ebuild_success

	ebuild_success() {
		do something warm and fuzzy
	}
fi

/etc/portage.env/notify.conf contains
EBUILD_SUCCESS="true"

and /etc/portage/package.env/libreoffice contains
app-office/libreoffice notify.conf


-- 
Neil Bothwick

"I can picture in my mind a world without war, a world without hate. And I
can picture us attacking that world, because they'd never expect it."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2014-07-14 12:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14 10:52 [gentoo-user] Can emerge play a sound on either a successful/unsuccessful build? Andrew Lowe
2014-07-14 11:15 ` Vladimir Romanov
2014-07-14 11:25 ` the
2014-07-14 11:28   ` Vladimir Romanov
2014-07-14 11:29     ` Vladimir Romanov
2014-07-14 11:40       ` Alan McKinnon
2014-07-14 11:47         ` Neil Bothwick
2014-07-14 12:07         ` Andrew Lowe
2014-07-14 11:46 ` Neil Bothwick
2014-07-14 12:09   ` Andrew Lowe
2014-07-14 12:21     ` Neil Bothwick [this message]
2014-07-15  9:17   ` J. Roeleveld
2014-07-15  9:57     ` Neil Bothwick
2014-07-16 16:46     ` Johám-Luís Miguéns Vila
2014-07-16 19:00       ` J. Roeleveld
2014-07-17 21:34         ` john

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140714132110.59fd54b3@digimed.co.uk \
    --to=neil@digimed.co.uk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox