From 7fdef103bb0ece06310d322456bb138f935bfbd0 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 14 Sep 2012 10:17:22 -0700 Subject: [PATCH] Use __ prefix for _hasg, _hasgq, and _unpack_tar. --- bin/phase-helpers.sh | 20 ++++++++++---------- bin/save-ebuild-env.sh | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 6a249e1dd..ddc96edc6 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -294,7 +294,7 @@ unpack() { fi [[ ! -s ${srcdir}${x} ]] && die "${x} does not exist" - _unpack_tar() { + __unpack_tar() { if [ "${y}" == "tar" ]; then $1 -c -- "$srcdir$x" | tar xof - __assert_sigpipe_ok "$myfail" @@ -324,10 +324,10 @@ unpack() { unzip -qo "${srcdir}${x}" || die "$myfail" ;; gz|Z|z) - _unpack_tar "gzip -d" + __unpack_tar "gzip -d" ;; bz2|bz) - _unpack_tar "${PORTAGE_BUNZIP2_COMMAND:-${PORTAGE_BZIP2_COMMAND} -d}" + __unpack_tar "${PORTAGE_BUNZIP2_COMMAND:-${PORTAGE_BZIP2_COMMAND} -d}" ;; 7Z|7z) local my_output @@ -374,13 +374,13 @@ unpack() { fi ;; lzma) - _unpack_tar "lzma -d" + __unpack_tar "lzma -d" ;; xz) if has $eapi 0 1 2 ; then __vecho "unpack ${x}: file format not recognized. Ignoring." else - _unpack_tar "xz -d" + __unpack_tar "xz -d" fi ;; *) @@ -400,14 +400,14 @@ econf() { [[ " ${FEATURES} " == *" force-prefix "* ]] || \ case "$EAPI" in 0|1|2) local EPREFIX= ;; esac - _hasg() { + __hasg() { local x s=$1 shift for x ; do [[ ${x} == ${s} ]] && echo "${x}" && return 0 ; done return 1 } - _hasgq() { _hasg "$@" >/dev/null ; } + __hasgq() { __hasg "$@" >/dev/null ; } local phase_func=$(__ebuild_arg_to_phase "$EAPI" "$EBUILD_PHASE") if [[ -n $phase_func ]] ; then @@ -469,9 +469,9 @@ econf() { if [[ -n ${ABI} && -n ${!LIBDIR_VAR} ]] ; then CONF_LIBDIR=${!LIBDIR_VAR} fi - if [[ -n ${CONF_LIBDIR} ]] && ! _hasgq --libdir=\* "$@" ; then - export CONF_PREFIX=$(_hasg --exec-prefix=\* "$@") - [[ -z ${CONF_PREFIX} ]] && CONF_PREFIX=$(_hasg --prefix=\* "$@") + if [[ -n ${CONF_LIBDIR} ]] && ! __hasgq --libdir=\* "$@" ; then + export CONF_PREFIX=$(__hasg --exec-prefix=\* "$@") + [[ -z ${CONF_PREFIX} ]] && CONF_PREFIX=$(__hasg --prefix=\* "$@") : ${CONF_PREFIX:=${EPREFIX}/usr} CONF_PREFIX=${CONF_PREFIX#*=} [[ ${CONF_PREFIX} != /* ]] && CONF_PREFIX="/${CONF_PREFIX}" diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh index 3b1a1da49..de8e1fb1a 100644 --- a/bin/save-ebuild-env.sh +++ b/bin/save-ebuild-env.sh @@ -67,13 +67,13 @@ __save_ebuild_env() { debug-print debug-print-function \ debug-print-section __helpers_die inherit EXPORT_FUNCTIONS \ nonfatal register_success_hook \ + __hasg __hasgq \ __save_ebuild_env __set_colors __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 \ - __unset_colors \ - _hasg _hasgq _unpack_tar \ + __unpack_tar __unset_colors \ ${QA_INTERCEPTORS} case "${EAPI}" in -- 2.26.2