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
In Reply to: Re: [gentoo-dev] versionator.eclass: convert to eshopts_{push,pop} by Mike Frysinger
On 19 July 2010 21:30, Mike Frysinger <vapier@g.o> wrote:
> i imagine this might be useful in some scenarios, but i think the more common > usage is to enable things inline.  otherwise, the exported API would need to > be wrapped internally like: > get_all_version_components() { >        eshopts_need _get_all_version_components -s extglob > }
It's meant to work to just define get_all_version_components with the assumption that extglob will be enabled, and then call eshopts_need in global scope right after.
> although, the method we have now also > allows for disabling of shopts before calling `die`.  not sure if that's > important, but i think it's better to disable before all exit/termination > points.
That's a reasonable point.
> so unless their is a consumer now we can point to in the tree, i'm inclined to > leave this alone.
Fair enough.
> there are already eshopts_push/pop funcs that accomodate more things than the > usage here, but i imagine you did it this way just to make testing in your > shell easier > -mike
It was supposed to support everything the existing functions do (not everything demonstrated in the example for brevity), but I might have missed something.


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