Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] ebuild: set up bash compat levels
Date: Thu, 12 Nov 2015 06:40:52
Message-Id: 56443470.1040704@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] ebuild: set up bash compat levels by Zac Medico
1 On 11/11/2015 10:33 PM, Zac Medico wrote:
2 > On 11/11/2015 01:11 PM, Mike Frysinger wrote:
3 >> On 11 Nov 2015 13:04, Zac Medico wrote:
4 >>> On 11/11/2015 12:55 PM, Mike Frysinger wrote:
5 >>>> On 11 Nov 2015 11:42, Zac Medico wrote:
6 >>>>> On 11/10/2015 08:39 PM, Mike Frysinger wrote:
7 >>>>>> +# Set up the bash version compatibility level.
8 >>>>>> +__check_bash_version() {
9 >>>>>
10 >>>>> Please unset all new internal function inside bin/save-ebuild-env.sh.
11 >>>>> Note that it already uses this line to unset functions beginning with
12 >>>>> ___eapi:
13 >>>>>
14 >>>>> unset -f $(compgen -A function ___eapi_)
15 >>>>
16 >>>> why don't we create a new namespace for portage funcs ? something like __e* ?
17 >>>
18 >>> That works for me. According to PMS, we're free to do anything we want
19 >>> as long as it begins with at least 2 underscores.
20 >>
21 >> interesting. why don't we just unmap all things that begin with 2 underscores
22 >> then ? or maybe 3 ?
23 >> -mike
24 >>
25 >
26 > Well, that's sort of a "greedy" approach when you consider that you
27 > might wipe out a function defined in an eclass or ebuild. Check this to
28 > see what might be filtered:
29 >
30 > bzgrep ^__ /var/db/pkg/*/*/environment.bz2
31 >
32 > A nice compromise is to choose a namespace like __portage or something
33 > like that.
34 >
35
36 Also note that some internals have been intentionally preserved in
37 environment.bz2. For example, __eapi6_src_install exposes the default
38 src_install implementation, which someone might examine for debugging
39 purposes.
40 --
41 Thanks,
42 Zac

Replies

Subject Author
Re: [gentoo-portage-dev] [PATCH] ebuild: set up bash compat levels Mike Frysinger <vapier@g.o>