Gentoo Archives: gentoo-dev

From: David Leverton <levertond@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] versionator.eclass: convert to eshopts_{push,pop}
Date: Mon, 19 Jul 2010 20:45:40
Message-Id: AANLkTikk0vLDDPCcn8QzKu683fmYym0ELqcSbOLOSv2X@mail.gmail.com
In Reply to: Re: [gentoo-dev] versionator.eclass: convert to eshopts_{push,pop} by Mike Frysinger
1 On 19 July 2010 21:30, Mike Frysinger <vapier@g.o> wrote:
2 > i imagine this might be useful in some scenarios, but i think the more common
3 > usage is to enable things inline.  otherwise, the exported API would need to
4 > be wrapped internally like:
5 > get_all_version_components() {
6 >        eshopts_need _get_all_version_components -s extglob
7 > }
8
9 It's meant to work to just define get_all_version_components with the
10 assumption that extglob will be enabled, and then call eshopts_need in
11 global scope right after.
12
13 > although, the method we have now also
14 > allows for disabling of shopts before calling `die`.  not sure if that's
15 > important, but i think it's better to disable before all exit/termination
16 > points.
17
18 That's a reasonable point.
19
20 > so unless their is a consumer now we can point to in the tree, i'm inclined to
21 > leave this alone.
22
23 Fair enough.
24
25 > there are already eshopts_push/pop funcs that accomodate more things than the
26 > usage here, but i imagine you did it this way just to make testing in your
27 > shell easier
28 > -mike
29
30 It was supposed to support everything the existing functions do (not
31 everything demonstrated in the example for brevity), but I might have
32 missed something.

Replies

Subject Author
Re: [gentoo-dev] versionator.eclass: convert to eshopts_{push,pop} Mike Frysinger <vapier@g.o>