Specifically, esyslog, {un,}set_unless_changed, and remove_path_entry.
fi
}
-# this is a function for removing any directory matching a passed in pattern from
-# PATH
-remove_path_entry() {
- save_IFS
- IFS=":"
- stripped_path="${PATH}"
- while [ -n "$1" ]; do
- cur_path=""
- for p in ${stripped_path}; do
- if [ "${p/${1}}" == "${p}" ]; then
- cur_path="${cur_path}:${p}"
- fi
- done
- stripped_path="${cur_path#:*}"
- shift
- done
- restore_IFS
- PATH="${stripped_path}"
-}
-
-# Set given variables unless these variable have been already set (e.g. during emerge
-# invocation) to values different than values set in make.conf.
-set_unless_changed() {
- if [[ $# -lt 1 ]]; then
- die "${FUNCNAME}() requires at least 1 argument: VARIABLE=VALUE"
- fi
-
- local argument value variable
- for argument in "$@"; do
- if [[ ${argument} != *=* ]]; then
- die "${FUNCNAME}(): Argument '${argument}' has incorrect syntax"
- fi
- variable="${argument%%=*}"
- value="${argument#*=}"
- if eval "[[ \${${variable}} == \$(env -u ${variable} portageq envvar ${variable}) ]]"; then
- eval "${variable}=\"\${value}\""
- fi
- done
-}
-
-# Unset given variables unless these variable have been set (e.g. during emerge
-# invocation) to values different than values set in make.conf.
-unset_unless_changed() {
- if [[ $# -lt 1 ]]; then
- die "${FUNCNAME}() requires at least 1 argument: VARIABLE"
- fi
-
- local variable
- for variable in "$@"; do
- if eval "[[ \${${variable}} == \$(env -u ${variable} portageq envvar ${variable}) ]]"; then
- unset ${variable}
- fi
- done
-}
-
KV_major() {
[[ -z $1 ]] && return 1
for x in diropts docompress exeopts get_KV insopts \
keepdir KV_major KV_micro KV_minor KV_to_int \
libopts register_die_hook register_success_hook \
- remove_path_entry set_unless_changed strip_duplicate_slashes \
- unset_unless_changed use_with use_enable ; do
+ strip_duplicate_slashes \
+ use_with use_enable ; do
eval "${x}() {
if has \"\${EAPI:-0}\" 4-python; then
die \"\${FUNCNAME}() calls are not allowed in global scope\"
# the sandbox is disabled by default except when overridden in the relevant stages
export SANDBOX_ON=0
-esyslog() {
- # Custom version of esyslog() to take care of the "Red Star" bug.
- # MUST follow functions.sh to override the "" parameter problem.
- return 0
-}
-
# Ensure that $PWD is sane whenever possible, to protect against
# exploitation of insecure search path for python -c in ebuilds.
# See bug #239560.
return 0
}
-esyslog() {
- local pri=
- local tag=
-
- if [ -x /usr/bin/logger ]
- then
- pri="$1"
- tag="$2"
-
- shift 2
- [ -z "$*" ] && return 0
-
- /usr/bin/logger -p "${pri}" -t "${tag}" -- "$*"
- fi
-
- return 0
-}
-
einfo() {
elog_base INFO "$*"
[[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
unset -f assert assert_sigpipe_ok \
dump_trace die \
quiet_mode vecho elog_base eqawarn elog \
- esyslog einfo einfon ewarn eerror ebegin _eend eend KV_major \
+ einfo einfon ewarn eerror ebegin _eend eend KV_major \
KV_minor KV_micro KV_to_int get_KV unset_colors set_colors has \
has_phase_defined_up_to \
hasv hasq qa_source qa_call \
dyn_compile dyn_test dyn_install \
dyn_preinst dyn_pretend dyn_help debug-print debug-print-function \
debug-print-section helpers_die inherit EXPORT_FUNCTIONS \
- nonfatal register_success_hook remove_path_entry \
+ nonfatal register_success_hook \
save_ebuild_env filter_readonly_variables preprocess_ebuild_env \
- set_unless_changed unset_unless_changed 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 \