Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Can emerge play a sound on either a successful/unsuccessful build?
Date: Mon, 14 Jul 2014 12:21:23
Message-Id: 20140714132110.59fd54b3@digimed.co.uk
In Reply to: Re: [gentoo-user] Can emerge play a sound on either a successful/unsuccessful build? by Andrew Lowe
1 On Mon, 14 Jul 2014 20:09:40 +0800, Andrew Lowe wrote:
2
3 > > register_die_hook ebuild_failed
4 > > ebuild_failed {
5 > > do something foreboding
6 > > }
7 > >
8 > > I actually have it send an alert to my phone with Posterous but you
9 > > can do whatever you want.
10 > >
11 > > I also use package.env to alert me when particularly
12 > > time-consuming ebuilds, like LibreOffice and Chromium, have completed
13 > > successfully.
14 > >
15 > >
16 >
17 > Neil,
18 > This sounds interesting. Care to share one of these hooks to
19 > show what they actually look like?
20
21 The path to Posterous my messages take is rather convoluted, but whatever
22 you put in the ebuild_failed function will be executed on failure. For
23 the success notifications, I put this in bashrc
24
25 if [[ "${EBUILD_SUCCESS}" == "true" ]]; then
26 register_success_hook ebuild_success
27
28 ebuild_success() {
29 do something warm and fuzzy
30 }
31 fi
32
33 /etc/portage.env/notify.conf contains
34 EBUILD_SUCCESS="true"
35
36 and /etc/portage/package.env/libreoffice contains
37 app-office/libreoffice notify.conf
38
39
40 --
41 Neil Bothwick
42
43 "I can picture in my mind a world without war, a world without hate. And I
44 can picture us attacking that world, because they'd never expect it."

Attachments

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