# with shell opts (shopts). Ebuilds/eclasses changing shopts should reset them
# when they are done.
-qa_source() {
+__qa_source() {
local shopts=$(shopt) OLDIFS="$IFS"
local retval
source "$@"
return $retval
}
-qa_call() {
+__qa_call() {
local shopts=$(shopt) OLDIFS="$IFS"
local retval
"$@"
[[ $PORTAGE_QUIET != "" ]] && export PORTAGE_QUIET
# sandbox support functions; defined prior to profile.bashrc srcing, since the profile might need to add a default exception (/usr/lib64/conftest fex)
-_sb_append_var() {
+__sb_append_var() {
local _v=$1 ; shift
local var="SANDBOX_${_v}"
[[ -z $1 || -n $2 ]] && die "Usage: add$(echo ${_v} | \
}
# bash-4 version:
# local var="SANDBOX_${1^^}"
-# addread() { _sb_append_var ${0#add} "$@" ; }
-addread() { _sb_append_var READ "$@" ; }
-addwrite() { _sb_append_var WRITE "$@" ; }
-adddeny() { _sb_append_var DENY "$@" ; }
-addpredict() { _sb_append_var PREDICT "$@" ; }
+# addread() { __sb_append_var ${0#add} "$@" ; }
+addread() { __sb_append_var READ "$@" ; }
+addwrite() { __sb_append_var WRITE "$@" ; }
+adddeny() { __sb_append_var DENY "$@" ; }
+addpredict() { __sb_append_var PREDICT "$@" ; }
addwrite "${PORTAGE_TMPDIR}"
addread "/:${PORTAGE_TMPDIR}"
#turn on glob expansion
set +f
- qa_source "$location" || die "died sourcing $location in inherit()"
+ __qa_source "$location" || die "died sourcing $location in inherit()"
#turn off glob expansion
set -f
PORTAGE_BASHRCS_SOURCED=0
-# @FUNCTION: source_all_bashrcs
+# @FUNCTION: __source_all_bashrcs
# @DESCRIPTION:
# Source a relevant bashrc files and perform other miscellaneous
# environment initialization when appropriate.
# * A "default" function which is an alias for the default phase
# function for the current phase.
#
-source_all_bashrcs() {
+__source_all_bashrcs() {
[[ $PORTAGE_BASHRCS_SOURCED = 1 ]] && return 0
PORTAGE_BASHRCS_SOURCED=1
local x
local path_array=($PROFILE_PATHS)
restore_IFS
for x in "${path_array[@]}" ; do
- [ -f "$x/profile.bashrc" ] && qa_source "$x/profile.bashrc"
+ [ -f "$x/profile.bashrc" ] && __qa_source "$x/profile.bashrc"
done
fi
has noauto $FEATURES ; then
# The bashrcs get an opportunity here to set aliases that will be expanded
# during sourcing of ebuilds and eclasses.
- source_all_bashrcs
+ __source_all_bashrcs
# When EBUILD_PHASE != depend, INHERITED comes pre-initialized
# from cache. In order to make INHERITED content independent of
declare -i strip=${1:-1}
local filespacing=$2 linespacing=$3
- # The qa_call() function and anything before it are portage internals
+ # The __qa_call() function and anything before it are portage internals
# that the user will not be interested in. Therefore, the stack trace
- # should only show calls that come after qa_call().
+ # should only show calls that come after __qa_call().
(( n = ${#FUNCNAME[@]} - 1 ))
(( p = ${#BASH_ARGV[@]} ))
while (( n > 0 )) ; do
- [ "${FUNCNAME[${n}]}" == "qa_call" ] && break
+ [ "${FUNCNAME[${n}]}" == "__qa_call" ] && break
(( p -= ${BASH_ARGC[${n}]} ))
(( n-- ))
done
# setup spacing to make output easier to read
(( n = ${#FUNCNAME[@]} - 1 ))
while (( n > 0 )) ; do
- [ "${FUNCNAME[${n}]}" == "qa_call" ] && break
+ [ "${FUNCNAME[${n}]}" == "__qa_call" ] && break
(( n-- ))
done
(( n == 0 )) && (( n = ${#FUNCNAME[@]} - 1 ))
einfo einfon ewarn eerror ebegin __eend eend KV_major \
KV_minor KV_micro KV_to_int get_KV __1 __1 has \
__has_phase_defined_up_to \
- hasv hasq qa_source qa_call \
- addread addwrite adddeny addpredict _sb_append_var \
+ hasv hasq __qa_source __qa_call \
+ addread addwrite adddeny addpredict __sb_append_var \
use usev useq has_version portageq \
best_version use_with use_enable register_die_hook \
keepdir unpack __strip_duplicate_slashes econf einstall \
debug-print-section __helpers_die inherit EXPORT_FUNCTIONS \
nonfatal register_success_hook \
__save_ebuild_env __filter_readonly_variables __preprocess_ebuild_env \
- source_all_bashrcs \
+ __source_all_bashrcs \
__ebuild_main __ebuild_phase __ebuild_phase_with_hooks \
__ebuild_arg_to_phase __ebuild_phase_funcs default \
_hasg _hasgq _unpack_tar \