aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-11-12 20:53:20 -0500
committerMike Frysinger <vapier@gentoo.org>2015-11-12 20:53:20 -0500
commit29f3837382babcac38d4c0e6498620b0dbc6df67 (patch)
tree1921dd457e05528f8e6c906e5e62646c3aac227c
parentebuild: clear __bashpid & __start_distcc from env (diff)
downloadportage-29f3837382babcac38d4c0e6498620b0dbc6df67.tar.gz
portage-29f3837382babcac38d4c0e6498620b0dbc6df67.tar.bz2
portage-29f3837382babcac38d4c0e6498620b0dbc6df67.zip
ebuild: unset all funcs/vars that start with ___
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.
-rw-r--r--bin/save-ebuild-env.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
index 31c2d6097..ddef1fd4f 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 \