Gentoo Archives: gentoo-dev

From: Chris Gianelloni <wolf31o2@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: epause instead of sleep in ebuilds
Date: Wed, 01 Sep 2004 20:44:43
Message-Id: 1094072966.31040.29.camel@cgianelloni.nuvox.net
In Reply to: [gentoo-dev] rfc: epause instead of sleep in ebuilds by Ciaran McCreesh
1 On Wed, 2004-09-01 at 16:21, Ciaran McCreesh wrote:
2 > Currently, we have something like 200 ebuilds which call 'sleep'. How
3 > would people feel about replacing this with an eutils function called
4 > 'epause' (or 'esleep', or 'ezzz', or esitaroundforabit)? This would give
5 > us two advantages:
6 >
7 > * For non-interactive builds (eg catalyst, chroot testing), an
8 > environment variable could be set which makes epause not actually pause.
9 > For certain packages on certain systems, the sleep takes longer than the
10 > rest of the build...
11 >
12 > * The behaviour of sleep isn't entirely standardised across different
13 > UNIX implementations. It would be better to have one place to make any
14 > changes needed by these new non-Linuxy platforms.
15 >
16 > I'd suggest an implementation along the following lines:
17 >
18 > # Wait for the supplied number of seconds. If no argument is supplied,
19 > # defaults to five seconds. If the EPAUSE_IGNORE env var is set, don't
20 > # wait.
21 > epause() {
22 > if [ -z "$EPAUSE_IGNORE" ] ; then
23 > sleep ${1:-5}
24 > fi
25 > }
26 >
27 > Thoughts? I'd be happy to do all the work :)
28
29 You'll do all the work?
30
31 In that case, I say go for it. Anything that'll speed up building a
32 LiveCD is fine by me.
33
34 --
35 Chris Gianelloni
36 Release Engineering - Operations/QA Manager
37 Games - Developer
38 Gentoo Linux
39
40 Is your power animal a penguin?

Attachments

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