summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gmail.com>2012-09-13 23:08:00 -0700
committerZac Medico <zmedico@gentoo.org>2012-09-14 00:14:08 -0700
commit4c14931d6ae701bd83bbe526001d2b7ba664b58e (patch)
treea9c91b74679f9181e4fa1f120e38ae075b2d25de
parent7571867c71392b5c61b040884017c00e9d1ecb3f (diff)
downloadportage-4c14931d6ae701bd83bbe526001d2b7ba664b58e.tar.gz
portage-4c14931d6ae701bd83bbe526001d2b7ba664b58e.tar.bz2
portage-4c14931d6ae701bd83bbe526001d2b7ba664b58e.zip
Convert funcs of save-ebuild-env.sh to __ prefixed namespace.
-rw-r--r--bin/phase-functions.sh20
-rw-r--r--bin/save-ebuild-env.sh6
2 files changed, 13 insertions, 13 deletions
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 8585a7193..71f4787e9 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -143,7 +143,7 @@ __filter_readonly_variables() {
# @FUNCTION: __preprocess_ebuild_env
# @DESCRIPTION:
# Filter any readonly variables from ${T}/environment, source it, and then
-# save it via save_ebuild_env(). This process should be sufficient to prevent
+# save it via __save_ebuild_env(). This process should be sufficient to prevent
# any stale variables or functions from an arbitrary environment from
# interfering with the current environment. This is useful when an existing
# environment needs to be loaded from a binary or installed package.
@@ -174,15 +174,15 @@ __preprocess_ebuild_env() {
# until we've merged them with our current values.
export SANDBOX_ON=0
- # It's remotely possible that save_ebuild_env() has been overridden
+ # It's remotely possible that __save_ebuild_env() has been overridden
# by the above source command. To protect ourselves, we override it
# here with our own version. ${PORTAGE_BIN_PATH} is safe to use here
# because it's already filtered above.
source "${PORTAGE_BIN_PATH}/save-ebuild-env.sh" || exit $?
- # Rely on save_ebuild_env() to filter out any remaining variables
+ # Rely on __save_ebuild_env() to filter out any remaining variables
# and functions that could interfere with the current environment.
- save_ebuild_env || exit $?
+ __save_ebuild_env || exit $?
>> "$T/environment.success" || exit $?
) > "${T}/environment.filtered"
local retval
@@ -586,9 +586,9 @@ __dyn_install() {
# local variables can leak into the saved environment.
unset f
- save_ebuild_env --exclude-init-phases | __filter_readonly_variables \
+ __save_ebuild_env --exclude-init-phases | __filter_readonly_variables \
--filter-path --filter-sandbox --allow-extra-vars > environment
- assert "save_ebuild_env failed"
+ assert "__save_ebuild_env failed"
${PORTAGE_BZIP2_COMMAND} -f9 environment
@@ -887,11 +887,11 @@ __ebuild_main() {
if [[ $EBUILD_PHASE == postinst ]] && [[ -n $PORTAGE_UPDATE_ENV ]]; then
# Update environment.bz2 in case installation phases
# need to pass some variables to uninstallation phases.
- save_ebuild_env --exclude-init-phases | \
+ __save_ebuild_env --exclude-init-phases | \
__filter_readonly_variables --filter-path \
--filter-sandbox --allow-extra-vars \
| ${PORTAGE_BZIP2_COMMAND} -c -f9 > "$PORTAGE_UPDATE_ENV"
- assert "save_ebuild_env failed"
+ assert "__save_ebuild_env failed"
fi
;;
unpack|prepare|configure|compile|test|clean|install)
@@ -987,9 +987,9 @@ __ebuild_main() {
# Save the env only for relevant phases.
if ! has "${1}" clean help info nofetch ; then
umask 002
- save_ebuild_env | __filter_readonly_variables \
+ __save_ebuild_env | __filter_readonly_variables \
--filter-features > "$T/environment"
- assert "save_ebuild_env failed"
+ assert "__save_ebuild_env failed"
chown portage:portage "$T/environment" &>/dev/null
chmod g+w "$T/environment" &>/dev/null
fi
diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
index f3a723b01..8db3ecbce 100644
--- a/bin/save-ebuild-env.sh
+++ b/bin/save-ebuild-env.sh
@@ -2,7 +2,7 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# @FUNCTION: save_ebuild_env
+# @FUNCTION: __save_ebuild_env
# @DESCRIPTION:
# echo the current environment to stdout, filtering out redundant info.
#
@@ -10,7 +10,7 @@
# be excluded from the output. These function are not needed for installation
# or removal of the packages, and can therefore be safely excluded.
#
-save_ebuild_env() {
+__save_ebuild_env() {
(
if has --exclude-init-phases $* ; then
unset S _E_DOCDESTTREE_ _E_EXEDESTTREE_ \
@@ -66,7 +66,7 @@ save_ebuild_env() {
__dyn_preinst dyn_pretend dyn_help debug-print debug-print-function \
debug-print-section __helpers_die inherit EXPORT_FUNCTIONS \
nonfatal register_success_hook \
- save_ebuild_env __filter_readonly_variables __preprocess_ebuild_env \
+ __save_ebuild_env __filter_readonly_variables __preprocess_ebuild_env \
source_all_bashrcs \
__ebuild_main __ebuild_phase __ebuild_phase_with_hooks \
__ebuild_arg_to_phase __ebuild_phase_funcs default \