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: unset all funcs/vars that start with ___
Date: Fri, 13 Nov 2015 02:44:29
Message-Id: 56454E85.10106@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] ebuild: unset all funcs/vars that start with ___ by Mike Frysinger
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 On 11/12/2015 05:55 PM, Mike Frysinger wrote:
5 > Since the __* (two) namespace is reserved, and ___* (three) has
6 > rarely (if ever) been used in ebuilds, we can nuke all funcs/vars
7 > that start with that. It makes clean up easier for us. ---
8 > bin/save-ebuild-env.sh | 4 +++- 1 file changed, 3 insertions(+), 1
9 > deletion(-)
10 >
11 > diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh index
12 > 31c2d60..ddef1fd 100644 --- a/bin/save-ebuild-env.sh +++
13 > b/bin/save-ebuild-env.sh @@ -89,7 +89,9 @@ __save_ebuild_env() {
14 > ___eapi_has_package_manager_build_user && unset -f
15 > package_manager_build_user ___eapi_has_package_manager_build_group
16 > && unset -f package_manager_build_group
17 >
18 > - unset -f $(compgen -A function ___eapi_) + # Clear out the triple
19 > underscore namespace as it is reserved by the PM. + unset -f
20 > $(compgen -A function ___) + unset ${!___*}
21 >
22 > # portage config variables and variables set directly by portage
23 > unset ACCEPT_LICENSE BAD BRACKET BUILD_PREFIX COLS \
24 >
25
26 Looks good.
27 - --
28 Thanks,
29 Zac
30 -----BEGIN PGP SIGNATURE-----
31 Version: GnuPG v2
32
33 iEYEARECAAYFAlZFToUACgkQ/ejvha5XGaNsXwCgvLm6da+cuZPa+PKSbCBBo+af
34 pjgAoJHkAaEd8jA9ZkoNnLYPiiPf/y4M
35 =IBwQ
36 -----END PGP SIGNATURE-----