Since the __* (two) namespace is reserved, and ___* (three) has rarely
(if ever) been used in ebuilds, we can nuke all funcs/vars that start
with that.  It makes clean up easier for us.
---
 bin/save-ebuild-env.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
index 31c2d60..ddef1fd 100644
--- a/bin/save-ebuild-env.sh
+++ b/bin/save-ebuild-env.sh
@@ -89,7 +89,9 @@ __save_ebuild_env() {
        ___eapi_has_package_manager_build_user && unset -f 
package_manager_build_user
        ___eapi_has_package_manager_build_group && unset -f 
package_manager_build_group
 
-       unset -f $(compgen -A function ___eapi_)
+       # Clear out the triple underscore namespace as it is reserved by the PM.
+       unset -f $(compgen -A function ___)
+       unset ${!___*}
 
        # portage config variables and variables set directly by portage
        unset ACCEPT_LICENSE BAD BRACKET BUILD_PREFIX COLS \
-- 
2.6.2


Reply via email to