Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Portage feature request
Date: Mon, 31 Oct 2005 01:47:31
Message-Id: 43657767.10806@gmail.com
In Reply to: Re: [gentoo-portage-dev] Portage feature request by Jason Pepas
1 Jason Pepas wrote:
2 > Well, the problem (as I see it) with building something like this into
3 > emerge is that you are making a special case for one program, when
4 > really this is functionality which is useful for any long running
5 > command line program.
6 >
7 > Additionally, sticking with the more traditional "UNIX Way" of doing
8 > things allows more flexibility. For example, if someone wants to be
9 > emailed when portage fails,
10 >
11 > emerge foo || mail -s "emerge died!" foo@×××.com < /dev/null
12 >
13 > It's a pretty elegant system IMHO.
14 >
15 > -jason pepas
16
17 Yes, I agree that the exit status is a very elegant way to implement an exit hook. George's feature request got me toying with the notion of building an exit hook into emerge (akin to the post_sync hook recently posted by Ned). Such an exit hook would really provide essentially the same functionality as the wrapper script the I previously posted, so the usefulness is questionable. Nonetheless, the feature could probably be implemented in python by catching exceptions.SystemExit and passing the exit status as an argument to a separate exit handler program.
18
19 Zac
20 --
21 gentoo-portage-dev@g.o mailing list