Convert funcs of isolated-functions.sh to __ prefixed namespace.
authorBrian Harring <ferringb@gmail.com>
Fri, 14 Sep 2012 05:14:01 +0000 (22:14 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 14 Sep 2012 06:55:44 +0000 (23:55 -0700)
31 files changed:
bin/ebuild-helpers/dobin
bin/ebuild-helpers/doconfd
bin/ebuild-helpers/dodir
bin/ebuild-helpers/dodoc
bin/ebuild-helpers/doenvd
bin/ebuild-helpers/doexe
bin/ebuild-helpers/doheader
bin/ebuild-helpers/dohtml
bin/ebuild-helpers/doinfo
bin/ebuild-helpers/doinitd
bin/ebuild-helpers/doins
bin/ebuild-helpers/dolib
bin/ebuild-helpers/doman
bin/ebuild-helpers/domo
bin/ebuild-helpers/dosbin
bin/ebuild-helpers/dosym
bin/ebuild-helpers/ecompress
bin/ebuild-helpers/ecompressdir
bin/ebuild-helpers/emake
bin/ebuild-helpers/fowners
bin/ebuild-helpers/fperms
bin/ebuild-helpers/newins
bin/ebuild-helpers/prepalldocs
bin/ebuild-helpers/prepinfo
bin/ebuild-helpers/prepstrip
bin/emerge-webrsync
bin/isolated-functions.sh
bin/misc-functions.sh
bin/phase-functions.sh
bin/phase-helpers.sh
bin/save-ebuild-env.sh

index f90d8933c1646d059b74134fd552980dec39e33d..06ae0c779e16f4df0a3036657759cc3b043fdffb 100755 (executable)
@@ -5,7 +5,7 @@
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ $# -lt 1 ]] ; then
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
@@ -13,7 +13,7 @@ fi
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 if [[ ! -d ${ED}${DESTTREE}/bin ]] ; then
-       install -d "${ED}${DESTTREE}/bin" || { helpers_die "${0##*/}: failed to install ${ED}${DESTTREE}/bin"; exit 2; }
+       install -d "${ED}${DESTTREE}/bin" || { __helpers_die "${0##*/}: failed to install ${ED}${DESTTREE}/bin"; exit 2; }
 fi
 
 ret=0
@@ -28,5 +28,5 @@ for x in "$@" ; do
        ((ret|=$?))
 done
 
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit ${ret}
index e146000227eefafb34e86bdb3709bcac2cbe4587..a3c09a50eb6bd3505a6d3851ef4104cd3e5e3d2a 100755 (executable)
@@ -4,7 +4,7 @@
 
 if [[ $# -lt 1 ]] ; then
        source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
index 90a3efed494a4d97b1871f60d0f74aea756a0547..c8f763deb08c8c98ddba50bcb36c655c09245752 100755 (executable)
@@ -9,5 +9,5 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 install -d ${DIROPTIONS} "${@/#/${ED}/}"
 ret=$?
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit $ret
index d6ce679337fe0c1998dc837555d1b2b0d1dc5488..2b0533febbd1fbbda2e8e3c4efb04c0c1df69057 100755 (executable)
@@ -16,7 +16,7 @@ esac
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [ $# -lt 1 ] ; then
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1  
 fi
 
@@ -41,5 +41,5 @@ for x in "$@" ; do
        fi
 done
 
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit ${ret}
index 28ab5d23438a0887180554bdb0cd77dfcfd8b9e5..9287933a9a7f8339a0d8364263c2d7cb9d13ee05 100755 (executable)
@@ -4,7 +4,7 @@
 
 if [[ $# -lt 1 ]] ; then
        source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
index fb228f90527682619de1d4fbc2a682bc70f27f53..efbf638fc9227f63ec460d95ebd4a1c699700c00 100755 (executable)
@@ -5,7 +5,7 @@
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ $# -lt 1 ]] ; then
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
@@ -26,7 +26,7 @@ for x in "$@" ; do
                cp "$x" "$TMP"
                mysrc=$TMP/${x##*/}
        elif [ -d "${x}" ] ; then
-               vecho "doexe: warning, skipping directory ${x}"
+               __vecho "doexe: warning, skipping directory ${x}"
                continue
        else
                mysrc="${x}"
@@ -42,5 +42,5 @@ done
 
 rm -rf "$TMP"
 
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit $ret
index c51ec1ed99791df9e806b152725e426cea41de9d..fa11564040df73d7ecc20274d65a624745b2e664 100755 (executable)
@@ -11,7 +11,7 @@ case "${EAPI}" in
 esac
 
 if [[ $# -lt 1 ]] ; then
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
index 630629a4bf7b20f9f4f133d9b6635548561d91cd..aec5e79bd0af2c917c8b9ab8cc7b956f932322a3 100755 (executable)
@@ -10,5 +10,5 @@ PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
        "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/dohtml.py" "$@"
 
 ret=$?
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit $ret
index 8fd7d45f8f472337d917e142304c4dd0174546f1..e4ccc90d99202aeb4380cfd706b9a675ffe0626a 100755 (executable)
@@ -5,7 +5,7 @@
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ -z $1 ]] ; then
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1  
 fi
 
@@ -13,7 +13,7 @@ fi
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 if [[ ! -d ${ED}usr/share/info ]] ; then
-       install -d "${ED}usr/share/info" || { helpers_die "${0##*/}: failed to install ${ED}usr/share/info"; exit 1; }
+       install -d "${ED}usr/share/info" || { __helpers_die "${0##*/}: failed to install ${ED}usr/share/info"; exit 1; }
 fi
 
 install -m0644 "$@" "${ED}usr/share/info"
@@ -22,6 +22,6 @@ if [ $rval -ne 0 ] ; then
        for x in "$@" ; do
                [ -e "$x" ] || echo "!!! ${0##*/}: $x does not exist" 1>&2
        done
-       helpers_die "${0##*/} failed"
+       __helpers_die "${0##*/} failed"
 fi
 exit $rval
index b711e190a67175e75de85cdbdb66017fa611f680..476b858f6dcb0b1ffaf59a8a5991b17347718c58 100755 (executable)
@@ -4,7 +4,7 @@
 
 if [[ $# -lt 1 ]] ; then
        source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
index 26b11a8697ba56952a179d2a2cdede28768a9c2d..c534f3f397bc42da84ea42a7f5faef6528e46dd3 100755 (executable)
@@ -18,7 +18,7 @@ if [[ ${helper} == dodoc ]] ; then
 fi
 
 if [ $# -lt 1 ] ; then
-       helpers_die "${helper}: at least one argument needed"
+       __helpers_die "${helper}: at least one argument needed"
        exit 1
 fi
 
@@ -33,11 +33,11 @@ fi
        case "$EAPI" in 0|1|2) export ED="${D}" ;; esac
 
 if [[ ${INSDESTTREE#${ED}} != "${INSDESTTREE}" ]]; then
-       vecho "-------------------------------------------------------" 1>&2
-       vecho "You should not use \${D} or \${ED} with helpers." 1>&2
-       vecho "  --> ${INSDESTTREE}" 1>&2
-       vecho "-------------------------------------------------------" 1>&2
-       helpers_die "${helper} used with \${D} or \${ED}"
+       __vecho "-------------------------------------------------------" 1>&2
+       __vecho "You should not use \${D} or \${ED} with helpers." 1>&2
+       __vecho "  --> ${INSDESTTREE}" 1>&2
+       __vecho "-------------------------------------------------------" 1>&2
+       __helpers_die "${helper} used with \${D} or \${ED}"
        exit 1
 fi
 
@@ -157,4 +157,4 @@ for x in "$@" ; do
        fi
 done
 rm -rf "$TMP"
-[[ $failed -ne 0 || $success -eq 0 ]] && { helpers_die "${helper} failed"; exit 1; } || exit 0
+[[ $failed -ne 0 || $success -eq 0 ]] && { __helpers_die "${helper} failed"; exit 1; } || exit 0
index 9af54189021d005bb61755d363a267a646850210..402965de7be9657c9efc0378c3bdb3dee94b7b8e 100755 (executable)
@@ -19,11 +19,11 @@ libdir="${ED}${DESTTREE}/${CONF_LIBDIR}"
 
 
 if [[ $# -lt 1 ]] ; then
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 if [[ ! -d ${libdir} ]] ; then
-       install -d "${libdir}" || { helpers_die "${0##*/}: failed to install ${libdir}"; exit 1; }
+       install -d "${libdir}" || { __helpers_die "${0##*/}: failed to install ${libdir}"; exit 1; }
 fi
 
 ret=0
@@ -42,5 +42,5 @@ for x in "$@" ; do
        ((ret|=$?))
 done
 
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit ${ret}
index b4047ce40dc0fc78b034493c87c2b4dd0c553094..c10296b34139fafe75713488a378fd993386c9f6 100755 (executable)
@@ -5,7 +5,7 @@
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ $# -lt 1 ]] ; then
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
@@ -58,10 +58,10 @@ for x in "$@" ; do
                        ((ret|=1))
                fi
        else
-               vecho "doman: '${x}' is probably not a man page; skipping" 1>&2
+               __vecho "doman: '${x}' is probably not a man page; skipping" 1>&2
                ((ret|=1))
        fi
 done
 
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit ${ret}
index d994343a9fa398b2be403b1a9c614e4ac63b489c..840b2de4c96e468208b35c8b1808f048c3f7441c 100755 (executable)
@@ -6,7 +6,7 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 mynum=${#}
 if [ ${mynum} -lt 1 ] ; then
-       helpers_die "${0}: at least one argument needed"
+       __helpers_die "${0}: at least one argument needed"
        exit 1
 fi
 
@@ -34,5 +34,5 @@ for x in "$@" ; do
        ((ret|=$?))
 done
 
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit $ret
index d101c8a6db9be943e3b5af0e16c012fa9c0bb69b..edc45846507c6f7816767f0f0f34aca3e4e5ff25 100755 (executable)
@@ -5,7 +5,7 @@
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ $# -lt 1 ]] ; then
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
@@ -13,7 +13,7 @@ fi
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 if [[ ! -d ${ED}${DESTTREE}/sbin ]] ; then
-       install -d "${ED}${DESTTREE}/sbin" || { helpers_die "${0##*/}: failed to install ${ED}${DESTTREE}/sbin"; exit 2; }
+       install -d "${ED}${DESTTREE}/sbin" || { __helpers_die "${0##*/}: failed to install ${ED}${DESTTREE}/sbin"; exit 2; }
 fi
 
 ret=0
@@ -28,5 +28,5 @@ for x in "$@" ; do
        ((ret|=$?))
 done
 
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit ${ret}
index 2489e22a2366f8f2968b1b0db5d09705bd88d2fd..34637c2f78886c06d59f2b71a557627d2876333d 100755 (executable)
@@ -5,7 +5,7 @@
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ $# -ne 2 ]] ; then
-       helpers_die "${0##*/}: two arguments needed"
+       __helpers_die "${0##*/}: two arguments needed"
        exit 1
 fi
 
@@ -26,5 +26,5 @@ target="${1}"
 ln -snf "${target}" "${ED}${2}"
 
 ret=$?
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit $ret
index b61421b002141997eb8dfb81b62f31411499709a..71287b4b07f1c82b03ba9508f981946d74859d4c 100755 (executable)
@@ -5,7 +5,7 @@
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ -z $1 ]] ; then
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
@@ -68,7 +68,7 @@ decompress_args() {
 
 case $1 in
        --suffix)
-               [[ -n $2 ]] && vecho "${0##*/}: --suffix takes no additional arguments" 1>&2
+               [[ -n $2 ]] && __vecho "${0##*/}: --suffix takes no additional arguments" 1>&2
 
                if [[ ! -e ${T}/.ecompress.suffix ]] ; then
                        set -e
@@ -93,7 +93,7 @@ case $1 in
                cat "${T}/.ecompress.suffix"
                ;;
        --bin)
-               [[ -n $2 ]] && vecho "${0##*/}: --bin takes no additional arguments" 1>&2
+               [[ -n $2 ]] && __vecho "${0##*/}: --bin takes no additional arguments" 1>&2
 
                echo "${PORTAGE_COMPRESS} ${PORTAGE_COMPRESS_FLAGS}"
                ;;
@@ -104,18 +104,18 @@ case $1 in
                        >> "$x"
                        ((ret|=$?))
                done
-               [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+               [[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
                exit $ret
                ;;
        --dequeue)
-               [[ -n $2 ]] && vecho "${0##*/}: --dequeue takes no additional arguments" 1>&2
+               [[ -n $2 ]] && __vecho "${0##*/}: --dequeue takes no additional arguments" 1>&2
                find "${D}" -name '*.ecompress.file' -print0 \
                        | sed -e 's:\.ecompress\.file::g' \
                        | ${XARGS} -0 ecompress
                find "${D}" -name '*.ecompress.file' -print0 | ${XARGS} -0 rm -f
                ;;
        --*)
-               helpers_die "${0##*/}: unknown arguments '$*'"
+               __helpers_die "${0##*/}: unknown arguments '$*'"
                exit 1
                ;;
        *)
@@ -155,7 +155,7 @@ case $1 in
                # Finally, let's actually do some real work
                "${PORTAGE_COMPRESS}" ${PORTAGE_COMPRESS_FLAGS} "$@"
                ret=$?
-               [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+               [[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
                exit $ret
                ;;
 esac
index 5ca0d3a358fa859e18da8794d23ffeff22c0098b..097ade2bc10934699e9b7b2182e0214972974514 100755 (executable)
@@ -5,7 +5,7 @@
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/helper-functions.sh
 
 if [[ -z $1 ]] ; then
-       helpers_die "${0##*/}: at least one argument needed"
+       __helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
@@ -30,11 +30,11 @@ case $1 in
                        >> "$x"
                        ((ret|=$?))
                done
-               [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+               [[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
                exit $ret
                ;;
        --dequeue)
-               [[ -n $2 ]] && vecho "${0##*/}: --dequeue takes no additional arguments" 1>&2
+               [[ -n $2 ]] && __vecho "${0##*/}: --dequeue takes no additional arguments" 1>&2
                find "${ED}" -name '*.ecompress.dir' -print0 \
                        | sed -e 's:\.ecompress\.dir::g' -e "s:${ED}:/:g" \
                        | ${XARGS} -0 ecompressdir
@@ -42,7 +42,7 @@ case $1 in
                exit 0
                ;;
        --*)
-               helpers_die "${0##*/}: unknown arguments '$*'"
+               __helpers_die "${0##*/}: unknown arguments '$*'"
                exit 1
                ;;
 esac
@@ -139,7 +139,7 @@ for dir in "$@" ; do
        dir=${dir#/}
        dir="${ED}${dir}"
        if [[ ! -d ${dir} ]] ; then
-               vecho "${0##*/}: /${dir#${ED}} does not exist!"
+               __vecho "${0##*/}: /${dir#${ED}} does not exist!"
                continue
        fi
        cd "${dir}"
@@ -177,7 +177,7 @@ for dir in "$@" ; do
 
        # now lets do our work
        if [[ -n ${suffix} ]] ; then
-               vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${ED}}"
+               __vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${ED}}"
                funk_up_dir "compress" "${suffix}" "ecompress"
                : $(( ret |= $? ))
        fi
@@ -186,5 +186,5 @@ for dir in "$@" ; do
        restore_skip_dirs
 done
 
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit ${ret}
index d842781a7bbe3bfe6899ffd7b3a6c6e64f5d49df..69d836f1aa6e8e71e40e510ccc3a088abb1c75ed 100755 (executable)
@@ -24,5 +24,5 @@ fi
 
 ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@"
 ret=$?
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit $ret
index a213c9eb128d20d5825b8d022a85d4140c082d17..5b93fd3c37829930c562e9160f5a079d728c58e9 100755 (executable)
@@ -18,5 +18,5 @@ if [[ ${ret} != 0 && -n ${EPREFIX} && ${EUID} != 0 ]] ; then
        exit 0
 fi
 
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit $ret
index a2f77ea002d0c8b38f8391e144bf5be1a71ea08d..668e905a2cf5bb6a1689add4e973081a5f6d0a31 100755 (executable)
@@ -12,5 +12,5 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 slash="/"
 chmod "${@/#${slash}/${ED}${slash}}"
 ret=$?
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit $ret
index 54245f3bc908f0f447b143abe068706252620a9d..20c68a1e25c1cc9385f15a344d95d3fa1298ce98 100755 (executable)
@@ -7,7 +7,7 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 helper=${0##*/}
 
 if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-       helpers_die "${helper}: Need two arguments, old file and new file"
+       __helpers_die "${helper}: Need two arguments, old file and new file"
        exit 1
 fi
 
@@ -24,14 +24,14 @@ rm -rf "${T}/$2"
 
 if [[ ${stdin} ]] ; then
        if [[ -t 0 ]] ; then
-               helpers_die "!!! ${helper}: Input is from a terminal"
+               __helpers_die "!!! ${helper}: Input is from a terminal"
                exit 1
        fi
        cat > "${T}/$2"
        ret=$?
 else
        if [[ ! -e $1 ]] ; then
-               helpers_die "!!! ${helper}: $1 does not exist"
+               __helpers_die "!!! ${helper}: $1 does not exist"
                exit 1
        fi
 
@@ -51,12 +51,12 @@ else
 fi
 
 if [[ ${ret} -ne 0 ]] ; then
-       helpers_die "${0##*/} failed"
+       __helpers_die "${0##*/} failed"
        exit ${ret}
 fi
 
 do${helper#new} "${T}/$2"
 ret=$?
 rm -rf "${T}/${2}"
-[[ $ret -ne 0 ]] && helpers_die "${helper} failed"
+[[ $ret -ne 0 ]] && __helpers_die "${helper} failed"
 exit $ret
index c9226d603e5fe68c534719d730e19f4c7dee9c5d..50b0c7070b65ef8180793873a9a80b6dfd459cf9 100755 (executable)
@@ -14,7 +14,7 @@ case "${EAPI}" in
 esac
 
 if [[ -n $1 ]] ; then
-       vecho "${0##*/}: invalid usage; takes no arguments" 1>&2
+       __vecho "${0##*/}: invalid usage; takes no arguments" 1>&2
 fi
 
 [[ " ${FEATURES} " == *" force-prefix "* ]] || \
index ffe2ecec30bac2f77c3360fdd32bcee1e6972779..e213f32d16d856c73888da624b3e29c4409229ca 100755 (executable)
@@ -19,7 +19,7 @@ fi
 
 if [[ ! -d ${ED}${infodir} ]] ; then
        if [[ -n $1 ]] ; then
-               vecho "${0##*/}: '${infodir}' does not exist!"
+               __vecho "${0##*/}: '${infodir}' does not exist!"
                exit 1
        else
                exit 0
index 2556ee240cfe6714552daaebc67d357c6fe5b0ed..802fdd826c6f04b803f4497c08a493c605f78e95 100755 (executable)
@@ -159,7 +159,7 @@ save_elf_debug() {
 process_elf() {
        local x=$1 strip_flags=${*:2}
 
-       vecho "   ${x:${#ED}}"
+       __vecho "   ${x:${#ED}}"
 
        # If two processes try to debugedit or strip the same hardlink at the
        # same time, it may corrupt files or cause loss of splitdebug info.
@@ -221,7 +221,7 @@ if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
        fi
        sed -e "/^\$/d" -e "s#^#/#" -i "${log}"
        if [[ -s ${log} ]] ; then
-               vecho -e "\n"
+               __vecho -e "\n"
                eqawarn "QA Notice: Pre-stripped files found:"
                eqawarn "$(<"${log}")"
        else
@@ -237,7 +237,7 @@ for x in \
        $(find "$@" -type f -name '*.a')
 do
        if ! ${banner} ; then
-               vecho "strip: ${STRIP} ${PORTAGE_STRIP_FLAGS}"
+               __vecho "strip: ${STRIP} ${PORTAGE_STRIP_FLAGS}"
                banner=true
        fi
 
@@ -277,7 +277,7 @@ do
 
        buildid=
        if [[ ${f} == *"current ar archive"* ]] ; then
-               vecho "   ${x:${#ED}}"
+               __vecho "   ${x:${#ED}}"
                if ${strip_this} ; then
                        # hmm, can we split debug/sources for .a ?
                        ${STRIP} -g "${x}"
@@ -305,7 +305,7 @@ if [[ -s ${tmpdir}/debug.sources ]] && \
    ! ${RESTRICT_installsources} && \
    ${debugedit_found}
 then
-       vecho "installsources: rsyncing source files"
+       __vecho "installsources: rsyncing source files"
        [[ -d ${D}${prepstrip_sources_dir} ]] || mkdir -p "${D}${prepstrip_sources_dir}"
        grep -zv '/<[^/>]*>$' "${tmpdir}"/debug.sources | \
                (cd "${WORKDIR}"; LANG=C sort -z -u | \
index a962ab548a84a73f5444593e2d1a3db67eb7ee09..09b75746c1a78f7b1f74c615b42f709908dc3ffb 100755 (executable)
@@ -132,7 +132,7 @@ fetch_file() {
                rm -f "${FILE}"
        fi
 
-       vecho "Fetching file ${FILE} ..."
+       __vecho "Fetching file ${FILE} ..."
        # already set DISTDIR=
        eval "${FETCHCOMMAND}" ${opts}
        [ -s "${DISTDIR}/${FILE}" ]
@@ -143,7 +143,7 @@ check_file_digest() {
        local file="$2"
        local r=1
 
-       vecho "Checking digest ..."
+       __vecho "Checking digest ..."
 
        if type -P md5sum > /dev/null; then
                local md5sum_output=$(md5sum "${file}")
@@ -165,7 +165,7 @@ check_file_signature() {
 
        if [ ${WEBSYNC_VERIFY_SIGNATURE} != 0 ]; then
 
-               vecho "Checking signature ..."
+               __vecho "Checking signature ..."
 
                if type -P gpg > /dev/null; then
                        gpg --homedir "${PORTAGE_GPG_DIR}" --verify "$signature" "$file" && r=0
@@ -189,7 +189,7 @@ get_snapshot_timestamp() {
 sync_local() {
        local file="$1"
 
-       vecho "Syncing local tree ..."
+       __vecho "Syncing local tree ..."
 
        local ownership="portage:portage"
        if has usersync ${FEATURES} ; then
@@ -227,12 +227,12 @@ sync_local() {
                rsync ${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS} . "${PORTDIR%%/}"
                cd ..
 
-               vecho "Cleaning up ..."
+               __vecho "Cleaning up ..."
                rm -fr portage
        fi
 
        if has metadata-transfer ${FEATURES} ; then
-               vecho "Updating cache ..."
+               __vecho "Updating cache ..."
                "${PORTAGE_BIN_PATH}/emerge" --metadata
        fi
        local post_sync=${PORTAGE_CONFIGROOT}etc/portage/bin/post_sync
@@ -269,7 +269,7 @@ do_snapshot() {
        for mirror in ${GENTOO_MIRRORS} ; do
 
                mirror=${mirror%/}
-               vecho "Trying to retrieve ${date} snapshot from ${mirror} ..."
+               __vecho "Trying to retrieve ${date} snapshot from ${mirror} ..."
 
                for compression in ${compressions} ; do
                        local file="portage-${date}.tar.${compression}"
@@ -298,7 +298,7 @@ do_snapshot() {
                        #
                        if [ ${have_files} -eq 1 ]; then
 
-                               vecho "Getting snapshot timestamp ..."
+                               __vecho "Getting snapshot timestamp ..."
                                local snapshot_timestamp=$(get_snapshot_timestamp "${DISTDIR}/${file}")
 
                                if [ ${ignore_timestamp} == 0 ]; then
@@ -338,7 +338,7 @@ do_snapshot() {
        if [ ${have_files} -eq 1 ]; then
                sync_local "${DISTDIR}/${file}" && r=0
        else
-               vecho "${date} snapshot was not found"
+               __vecho "${date} snapshot was not found"
        fi
 
        ${keep} || rm -f "${DISTDIR}/${file}" "${DISTDIR}/${digest}" "${DISTDIR}/${signature}"
@@ -349,7 +349,7 @@ do_latest_snapshot() {
        local attempts=0
        local r=1
 
-       vecho "Fetching most recent snapshot ..."
+       __vecho "Fetching most recent snapshot ..."
 
        # The snapshot for a given day is generated at 00:45 UTC on the following
        # day, so the current day's snapshot (going by UTC time) hasn't been
index 154506e67d85c3058b5b43cce9a3632a52d3893e..076e31f43613e1821afe78cde834e33bd95b7279 100644 (file)
@@ -15,7 +15,7 @@ assert() {
        done
 }
 
-assert_sigpipe_ok() {
+__assert_sigpipe_ok() {
        # When extracting a tar file like this:
        #
        #     bzip2 -dc foo.tar.bz2 | tar xof -
@@ -43,10 +43,10 @@ assert_sigpipe_ok() {
 
 shopt -s extdebug
 
-# dump_trace([number of funcs on stack to skip],
+# __dump_trace([number of funcs on stack to skip],
 #            [whitespacing for filenames],
 #            [whitespacing for line numbers])
-dump_trace() {
+__dump_trace() {
        local funcname="" sourcefile="" lineno="" s="yes" n p
        declare -i strip=${1:-1}
        local filespacing=$2 linespacing=$3
@@ -96,7 +96,7 @@ nonfatal() {
        PORTAGE_NONFATAL=1 "$@"
 }
 
-helpers_die() {
+__helpers_die() {
        case "${EAPI:-0}" in
                0|1|2|3)
                        echo -e "$@" >&2
@@ -143,11 +143,11 @@ die() {
        eerror "ERROR: $CATEGORY/$PF failed${phase_str}:"
        eerror "  ${*:-(no error message)}"
        eerror
-       # dump_trace is useless when the main script is a helper binary
+       # __dump_trace is useless when the main script is a helper binary
        local main_index
        (( main_index = ${#BASH_SOURCE[@]} - 1 ))
        if has ${BASH_SOURCE[$main_index]##*/} ebuild.sh misc-functions.sh ; then
-       dump_trace 2 ${filespacing} ${linespacing}
+       __dump_trace 2 ${filespacing} ${linespacing}
        eerror "  $(printf "%${filespacing}s" "${BASH_SOURCE[1]##*/}"), line $(printf "%${linespacing}s" "${BASH_LINENO[0]}"):  Called die"
        eerror "The specific snippet of code:"
        # This scans the file that called die and prints out the logic that
@@ -205,7 +205,7 @@ die() {
 
        # Only call die hooks here if we are executed via ebuild.sh or
        # misc-functions.sh, since those are the only cases where the environment
-       # contains the hook functions. When necessary (like for helpers_die), die
+       # contains the hook functions. When necessary (like for __helpers_die), die
        # hooks are automatically called later by a misc-functions.sh invocation.
        if has ${BASH_SOURCE[$main_index]##*/} ebuild.sh misc-functions.sh && \
                [[ ${EBUILD_PHASE} != depend ]] ; then
@@ -245,16 +245,16 @@ die() {
        exit 1
 }
 
-quiet_mode() {
+__quiet_mode() {
        [[ ${PORTAGE_QUIET} -eq 1 ]]
 }
 
-vecho() {
-       quiet_mode || echo "$@"
+__vecho() {
+       __quiet_mode || echo "$@"
 }
 
 # Internal logging function, don't use this in ebuilds
-elog_base() {
+__elog_base() {
        local messagetype
        [ -z "${1}" -o -z "${T}" -o ! -d "${T}/logging" ] && return 1
        case "${1}" in
@@ -263,7 +263,7 @@ elog_base() {
                        shift
                        ;;
                *)
-                       vecho -e " ${BAD}*${NORMAL} Invalid use of internal function elog_base(), next message will not be logged"
+                       __vecho -e " ${BAD}*${NORMAL} Invalid use of internal function __elog_base(), next message will not be logged"
                        return 1
                        ;;
        esac
@@ -275,17 +275,17 @@ elog_base() {
 }
 
 eqawarn() {
-       elog_base QA "$*"
+       __elog_base QA "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
        echo -e "$@" | while read -r ; do
-               vecho " $WARN*$NORMAL $REPLY" >&2
+               __vecho " $WARN*$NORMAL $REPLY" >&2
        done
        LAST_E_CMD="eqawarn"
        return 0
 }
 
 elog() {
-       elog_base LOG "$*"
+       __elog_base LOG "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
        echo -e "$@" | while read -r ; do
                echo " $GOOD*$NORMAL $REPLY"
@@ -295,7 +295,7 @@ elog() {
 }
 
 einfo() {
-       elog_base INFO "$*"
+       __elog_base INFO "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
        echo -e "$@" | while read -r ; do
                echo " $GOOD*$NORMAL $REPLY"
@@ -305,7 +305,7 @@ einfo() {
 }
 
 einfon() {
-       elog_base INFO "$*"
+       __elog_base INFO "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
        echo -ne " ${GOOD}*${NORMAL} $*"
        LAST_E_CMD="einfon"
@@ -313,7 +313,7 @@ einfon() {
 }
 
 ewarn() {
-       elog_base WARN "$*"
+       __elog_base WARN "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
        echo -e "$@" | while read -r ; do
                echo " $WARN*$NORMAL $RC_INDENTATION$REPLY" >&2
@@ -323,7 +323,7 @@ ewarn() {
 }
 
 eerror() {
-       elog_base ERROR "$*"
+       __elog_base ERROR "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
        echo -e "$@" | while read -r ; do
                echo " $BAD*$NORMAL $RC_INDENTATION$REPLY" >&2
@@ -348,7 +348,7 @@ ebegin() {
        return 0
 }
 
-_eend() {
+__eend() {
        local retval=${1:-0} efunc=${2:-eerror} msg
        shift 2
 
@@ -375,13 +375,13 @@ eend() {
        local retval=${1:-0}
        shift
 
-       _eend ${retval} eerror "$*"
+       __eend ${retval} eerror "$*"
 
        LAST_E_CMD="eend"
        return ${retval}
 }
 
-unset_colors() {
+__unset_colors() {
        COLS=80
        ENDCOL=
 
@@ -393,7 +393,7 @@ unset_colors() {
        BRACKET=
 }
 
-set_colors() {
+__set_colors() {
        COLS=${COLUMNS:-0}      # bash's internal COLUMNS variable
        # Avoid wasteful stty calls during the "depend" phases.
        # If stdout is a pipe, the parent process can export COLUMNS
@@ -426,10 +426,10 @@ RC_DOT_PATTERN=''
 
 case "${NOCOLOR:-false}" in
        yes|true)
-               unset_colors
+               __unset_colors
                ;;
        no|false)
-               set_colors
+               __set_colors
                ;;
 esac
 
index 9eec8bb691fb8ae2668bac6ea1d1a2993f10b544..5bc946fc19b8260f7a8e59e80480a3d007f77cfb 100755 (executable)
@@ -226,11 +226,11 @@ install_qa_check() {
                                -i "${T}"/scanelf-ignored-CFLAGS.log
                        f=$(<"${T}"/scanelf-ignored-CFLAGS.log)
                        if [[ -n ${f} ]] ; then
-                               vecho -ne '\n'
+                               __vecho -ne '\n'
                                eqawarn "${BAD}QA Notice: Files built without respecting CFLAGS have been detected${NORMAL}"
                                eqawarn " Please include the following list of files in your report:"
                                eqawarn "${f}"
-                               vecho -ne '\n'
+                               __vecho -ne '\n'
                                sleep 1
                        else
                                rm -f "${T}"/scanelf-ignored-CFLAGS.log
@@ -273,10 +273,10 @@ install_qa_check() {
        # Now we look for all world writable files.
        local unsafe_files=$(find "${ED}" -type f -perm -2 | sed -e "s:^${ED}:- :")
        if [[ -n ${unsafe_files} ]] ; then
-               vecho "QA Security Notice: world writable file(s):"
-               vecho "${unsafe_files}"
-               vecho "- This may or may not be a security problem, most of the time it is one."
-               vecho "- Please double check that $PF really needs a world writeable bit and file bugs accordingly."
+               __vecho "QA Security Notice: world writable file(s):"
+               __vecho "${unsafe_files}"
+               __vecho "- This may or may not be a security problem, most of the time it is one."
+               __vecho "- Please double check that $PF really needs a world writeable bit and file bugs accordingly."
                sleep 1
        fi
 
@@ -307,7 +307,7 @@ install_qa_check() {
                        for l in $(echo "${rpath_files}" | grep -E ":${dir}|::|: "); do
                                f+="  ${l%%:*}\n"
                                if ! has stricter ${FEATURES}; then
-                                       vecho "Auto fixing rpaths for ${l%%:*}"
+                                       __vecho "Auto fixing rpaths for ${l%%:*}"
                                        TMPDIR="${dir}" scanelf -BXr "${l%%:*}" -o /dev/null
                                fi
                        done
@@ -321,12 +321,12 @@ install_qa_check() {
 
                # Print QA notice.
                if [[ -n ${f}${x} ]] ; then
-                       vecho -ne '\n'
+                       __vecho -ne '\n'
                        eqawarn "QA Notice: The following files contain insecure RUNPATHs"
                        eqawarn " Please file a bug about this at http://bugs.gentoo.org/"
                        eqawarn " with the maintaining herd of the package."
                        eqawarn "${f}${f:+${x:+\n}}${x}"
-                       vecho -ne '\n'
+                       __vecho -ne '\n'
                        if [[ -n ${x} ]] || has stricter ${FEATURES} ; then
                                insecure_rpath=1
                        fi
@@ -344,7 +344,7 @@ install_qa_check() {
                f=$(scanelf -qyRF '%t %p' "${ED}" | grep -v 'usr/lib/debug/')
                if [[ -n ${f} ]] ; then
                        scanelf -qyRAF '%T %p' "${PORTAGE_BUILDDIR}"/ &> "${T}"/scanelf-textrel.log
-                       vecho -ne '\n'
+                       __vecho -ne '\n'
                        eqawarn "QA Notice: The following files contain runtime text relocations"
                        eqawarn " Text relocations force the dynamic linker to perform extra"
                        eqawarn " work at startup, waste system resources, and may pose a security"
@@ -353,7 +353,7 @@ install_qa_check() {
                        eqawarn " For more information, see http://hardened.gentoo.org/pic-fix-guide.xml"
                        eqawarn " Please include the following list of files in your report:"
                        eqawarn "${f}"
-                       vecho -ne '\n'
+                       __vecho -ne '\n'
                        die_msg="${die_msg} textrels,"
                        sleep 1
                fi
@@ -389,7 +389,7 @@ install_qa_check() {
                if [[ -n ${f} ]] ; then
                        # One more pass to help devs track down the source
                        scanelf -qyRAF '%e %p' "${PORTAGE_BUILDDIR}"/ &> "${T}"/scanelf-execstack.log
-                       vecho -ne '\n'
+                       __vecho -ne '\n'
                        eqawarn "QA Notice: The following files contain writable and executable sections"
                        eqawarn " Files with such sections will not work properly (or at all!) on some"
                        eqawarn " architectures/operating systems.  A bug should be filed at"
@@ -399,7 +399,7 @@ install_qa_check() {
                        eqawarn " Note: Bugs should be filed for the respective maintainers"
                        eqawarn " of the package in question and not hardened@g.o."
                        eqawarn "${f}"
-                       vecho -ne '\n'
+                       __vecho -ne '\n'
                        die_msg="${die_msg} execstacks"
                        sleep 1
                fi
@@ -421,11 +421,11 @@ install_qa_check() {
                                        -i "${T}"/scanelf-ignored-LDFLAGS.log
                                f=$(<"${T}"/scanelf-ignored-LDFLAGS.log)
                                if [[ -n ${f} ]] ; then
-                                       vecho -ne '\n'
+                                       __vecho -ne '\n'
                                        eqawarn "${BAD}QA Notice: Files built without respecting LDFLAGS have been detected${NORMAL}"
                                        eqawarn " Please include the following list of files in your report:"
                                        eqawarn "${f}"
-                                       vecho -ne '\n'
+                                       __vecho -ne '\n'
                                        sleep 1
                                else
                                        rm -f "${T}"/scanelf-ignored-LDFLAGS.log
@@ -463,10 +463,10 @@ install_qa_check() {
                        sed -e "/^\$/d" -i "${T}"/scanelf-missing-SONAME.log
                        f=$(<"${T}"/scanelf-missing-SONAME.log)
                        if [[ -n ${f} ]] ; then
-                               vecho -ne '\n'
+                               __vecho -ne '\n'
                                eqawarn "QA Notice: The following shared libraries lack a SONAME"
                                eqawarn "${f}"
-                               vecho -ne '\n'
+                               __vecho -ne '\n'
                                sleep 1
                        else
                                rm -f "${T}"/scanelf-missing-SONAME.log
@@ -497,10 +497,10 @@ install_qa_check() {
                        sed -e "/^\$/d" -i "${T}"/scanelf-missing-NEEDED.log
                        f=$(<"${T}"/scanelf-missing-NEEDED.log)
                        if [[ -n ${f} ]] ; then
-                               vecho -ne '\n'
+                               __vecho -ne '\n'
                                eqawarn "QA Notice: The following shared libraries lack NEEDED entries"
                                eqawarn "${f}"
-                               vecho -ne '\n'
+                               __vecho -ne '\n'
                                sleep 1
                        else
                                rm -f "${T}"/scanelf-missing-NEEDED.log
@@ -587,7 +587,7 @@ install_qa_check() {
                        [[ ! -e ${j} ]] && continue
                        [[ -L ${j} ]] && continue
                        [[ -x ${j} ]] && continue
-                       vecho "making executable: ${j#${ED}}"
+                       __vecho "making executable: ${j#${ED}}"
                        chmod +x "${j}"
                done
 
@@ -595,7 +595,7 @@ install_qa_check() {
                        [[ ! -e ${j} ]] && continue
                        [[ -L ${j} ]] && continue
                        [[ ! -x ${j} ]] && continue
-                       vecho "removing executable bit: ${j#${ED}}"
+                       __vecho "removing executable bit: ${j#${ED}}"
                        chmod -x "${j}"
                done
 
@@ -604,7 +604,7 @@ install_qa_check() {
                        [[ ! -L ${j} ]] && continue
                        linkdest=$(readlink "${j}")
                        if [[ ${linkdest} == /* ]] ; then
-                               vecho -ne '\n'
+                               __vecho -ne '\n'
                                eqawarn "QA Notice: Found an absolute symlink in a library directory:"
                                eqawarn "           ${j#${D}} -> ${linkdest}"
                                eqawarn "           It should be a relative symlink if in the same directory"
@@ -624,7 +624,7 @@ install_qa_check() {
                if [[ ! -e ${s} ]] ; then
                        s=${s%usr/*}${s##*/usr/}
                        if [[ -e ${s} ]] ; then
-                               vecho -ne '\n'
+                               __vecho -ne '\n'
                                eqawarn "QA Notice: Missing gen_usr_ldscript for ${s##*/}"
                                abort="yes"
                        fi
@@ -635,10 +635,10 @@ install_qa_check() {
        # Make sure people don't store libtool files or static libs in /lib
        f=$(ls "${ED}"lib*/*.{a,la} 2>/dev/null)
        if [[ -n ${f} ]] ; then
-               vecho -ne '\n'
+               __vecho -ne '\n'
                eqawarn "QA Notice: Excessive files found in the / partition"
                eqawarn "${f}"
-               vecho -ne '\n'
+               __vecho -ne '\n'
                die "static archives (*.a) and libtool library files (*.la) do not belong in /"
        fi
 
@@ -647,7 +647,7 @@ install_qa_check() {
        for a in "${ED}"usr/lib*/*.la ; do
                s=${a##*/}
                if grep -qs "${ED}" "${a}" ; then
-                       vecho -ne '\n'
+                       __vecho -ne '\n'
                        eqawarn "QA Notice: ${s} appears to contain PORTAGE_TMPDIR paths"
                        abort="yes"
                fi
@@ -726,11 +726,11 @@ install_qa_check() {
                                        eerror " with the maintaining herd of the package."
                                        eerror
                                else
-                                       vecho -ne '\n'
+                                       __vecho -ne '\n'
                                        eqawarn "QA Notice: Package triggers severe warnings which indicate that it"
                                        eqawarn "           may exhibit random runtime failures."
                                        eqawarn "${f}"
-                                       vecho -ne '\n'
+                                       __vecho -ne '\n'
                                fi
                        fi
                done
@@ -763,11 +763,11 @@ install_qa_check() {
                                eerror " with the maintaining herd of the package."
                                eerror
                        else
-                               vecho -ne '\n'
+                               __vecho -ne '\n'
                                eqawarn "QA Notice: Package triggers severe warnings which indicate that it"
                                eqawarn "           will almost certainly crash on 64bit architectures."
                                eqawarn "${f}"
-                               vecho -ne '\n'
+                               __vecho -ne '\n'
                        fi
 
                fi
@@ -952,7 +952,7 @@ install_mask() {
        local no_inst
        for no_inst in ${install_mask}; do
                set +o noglob
-               quiet_mode || einfo "Removing ${no_inst}"
+               __quiet_mode || einfo "Removing ${no_inst}"
                # normal stuff
                rm -Rf "${root}"/${no_inst} >&/dev/null
 
@@ -1050,19 +1050,19 @@ preinst_suid_scan() {
                # to files outside of the sandbox, but this
                # can easly be bypassed using the addwrite() function
                addwrite "${sfconf}"
-               vecho ">>> Performing suid scan in ${ED}"
+               __vecho ">>> Performing suid scan in ${ED}"
                for i in $(find "${ED}" -type f \( -perm -4000 -o -perm -2000 \) ); do
                        if [ -s "${sfconf}" ]; then
                                install_path=/${i#${ED}}
                                if grep -q "^${install_path}\$" "${sfconf}" ; then
-                                       vecho "- ${install_path} is an approved suid file"
+                                       __vecho "- ${install_path} is an approved suid file"
                                else
-                                       vecho ">>> Removing sbit on non registered ${install_path}"
+                                       __vecho ">>> Removing sbit on non registered ${install_path}"
                                        for x in 5 4 3 2 1 0; do sleep 0.25 ; done
                                        ls_ret=$(ls -ldh "${i}")
                                        chmod ugo-s "${i}"
                                        grep "^#${install_path}$" "${sfconf}" > /dev/null || {
-                                               vecho ">>> Appending commented out entry to ${sfconf} for ${PF}"
+                                               __vecho ">>> Appending commented out entry to ${sfconf} for ${PF}"
                                                echo "## ${ls_ret%${ED}*}${install_path}" >> "${sfconf}"
                                                echo "#${install_path}" >> "${sfconf}"
                                                # no delwrite() eh?
@@ -1070,7 +1070,7 @@ preinst_suid_scan() {
                                        }
                                fi
                        else
-                               vecho "suidctl feature set but you are lacking a ${sfconf}"
+                               __vecho "suidctl feature set but you are lacking a ${sfconf}"
                        fi
                done
        fi
@@ -1087,7 +1087,7 @@ preinst_selinux_labels() {
                # and 'context' is available on selinuxfs.
                if [ -f /selinux/context -o -f /sys/fs/selinux/context ] && \
                        [ -x /usr/sbin/setfiles -a -x /usr/sbin/selinuxconfig ]; then
-                       vecho ">>> Setting SELinux security labels"
+                       __vecho ">>> Setting SELinux security labels"
                        (
                                eval "$(/usr/sbin/selinuxconfig)" || \
                                        die "Failed to determine SELinux policy paths.";
@@ -1100,7 +1100,7 @@ preinst_selinux_labels() {
                else
                        # nonfatal, since merging can happen outside a SE kernel
                        # like during a recovery situation
-                       vecho "!!! Unable to set SELinux security labels"
+                       __vecho "!!! Unable to set SELinux security labels"
                fi
        fi
 }
@@ -1158,7 +1158,7 @@ dyn_package() {
        fi
        [ -n "${md5_hash}" ] && \
                echo ${md5_hash} > "${PORTAGE_BUILDDIR}"/build-info/BINPKGMD5
-       vecho ">>> Done."
+       __vecho ">>> Done."
 
        # cleanup our temp tree
        [[ -n ${PKG_INSTALL_MASK} ]] && rm -rf "${PROOT}"
index e50b34033f48cbb91bb9243be8b79fcde53792c9..34e9da12dad71aca5440a83c04b470fcf92c3c49 100644 (file)
@@ -210,8 +210,8 @@ ebuild_phase_with_hooks() {
 
 dyn_pretend() {
        if [[ -e $PORTAGE_BUILDDIR/.pretended ]] ; then
-               vecho ">>> It appears that '$PF' is already pretended; skipping."
-               vecho ">>> Remove '$PORTAGE_BUILDDIR/.pretended' to force pretend."
+               __vecho ">>> It appears that '$PF' is already pretended; skipping."
+               __vecho ">>> Remove '$PORTAGE_BUILDDIR/.pretended' to force pretend."
                return 0
        fi
        ebuild_phase pre_pkg_pretend
@@ -223,8 +223,8 @@ dyn_pretend() {
 
 dyn_setup() {
        if [[ -e $PORTAGE_BUILDDIR/.setuped ]] ; then
-               vecho ">>> It appears that '$PF' is already setup; skipping."
-               vecho ">>> Remove '$PORTAGE_BUILDDIR/.setuped' to force setup."
+               __vecho ">>> It appears that '$PF' is already setup; skipping."
+               __vecho ">>> Remove '$PORTAGE_BUILDDIR/.setuped' to force setup."
                return 0
        fi
        ebuild_phase pre_pkg_setup
@@ -236,7 +236,7 @@ dyn_setup() {
 
 dyn_unpack() {
        if [[ -f ${PORTAGE_BUILDDIR}/.unpacked ]] ; then
-               vecho ">>> WORKDIR is up-to-date, keeping..."
+               __vecho ">>> WORKDIR is up-to-date, keeping..."
                return 0
        fi
        if [ ! -d "${WORKDIR}" ]; then
@@ -244,11 +244,11 @@ dyn_unpack() {
        fi
        cd "${WORKDIR}" || die "Directory change failed: \`cd '${WORKDIR}'\`"
        ebuild_phase pre_src_unpack
-       vecho ">>> Unpacking source..."
+       __vecho ">>> Unpacking source..."
        ebuild_phase src_unpack
        >> "$PORTAGE_BUILDDIR/.unpacked" || \
                die "Failed to create $PORTAGE_BUILDDIR/.unpacked"
-       vecho ">>> Source unpacked in ${WORKDIR}"
+       __vecho ">>> Source unpacked in ${WORKDIR}"
        ebuild_phase post_src_unpack
 }
 
@@ -357,8 +357,8 @@ has_phase_defined_up_to() {
 dyn_prepare() {
 
        if [[ -e $PORTAGE_BUILDDIR/.prepared ]] ; then
-               vecho ">>> It appears that '$PF' is already prepared; skipping."
-               vecho ">>> Remove '$PORTAGE_BUILDDIR/.prepared' to force prepare."
+               __vecho ">>> It appears that '$PF' is already prepared; skipping."
+               __vecho ">>> Remove '$PORTAGE_BUILDDIR/.prepared' to force prepare."
                return 0
        fi
 
@@ -375,11 +375,11 @@ dyn_prepare() {
        trap abort_prepare SIGINT SIGQUIT
 
        ebuild_phase pre_src_prepare
-       vecho ">>> Preparing source in $PWD ..."
+       __vecho ">>> Preparing source in $PWD ..."
        ebuild_phase src_prepare
        >> "$PORTAGE_BUILDDIR/.prepared" || \
                die "Failed to create $PORTAGE_BUILDDIR/.prepared"
-       vecho ">>> Source prepared."
+       __vecho ">>> Source prepared."
        ebuild_phase post_src_prepare
 
        trap - SIGINT SIGQUIT
@@ -388,8 +388,8 @@ dyn_prepare() {
 dyn_configure() {
 
        if [[ -e $PORTAGE_BUILDDIR/.configured ]] ; then
-               vecho ">>> It appears that '$PF' is already configured; skipping."
-               vecho ">>> Remove '$PORTAGE_BUILDDIR/.configured' to force configuration."
+               __vecho ">>> It appears that '$PF' is already configured; skipping."
+               __vecho ">>> Remove '$PORTAGE_BUILDDIR/.configured' to force configuration."
                return 0
        fi
 
@@ -407,11 +407,11 @@ dyn_configure() {
 
        ebuild_phase pre_src_configure
 
-       vecho ">>> Configuring source in $PWD ..."
+       __vecho ">>> Configuring source in $PWD ..."
        ebuild_phase src_configure
        >> "$PORTAGE_BUILDDIR/.configured" || \
                die "Failed to create $PORTAGE_BUILDDIR/.configured"
-       vecho ">>> Source configured."
+       __vecho ">>> Source configured."
 
        ebuild_phase post_src_configure
 
@@ -421,8 +421,8 @@ dyn_configure() {
 dyn_compile() {
 
        if [[ -e $PORTAGE_BUILDDIR/.compiled ]] ; then
-               vecho ">>> It appears that '${PF}' is already compiled; skipping."
-               vecho ">>> Remove '$PORTAGE_BUILDDIR/.compiled' to force compilation."
+               __vecho ">>> It appears that '${PF}' is already compiled; skipping."
+               __vecho ">>> Remove '$PORTAGE_BUILDDIR/.compiled' to force compilation."
                return 0
        fi
 
@@ -447,11 +447,11 @@ dyn_compile() {
 
        ebuild_phase pre_src_compile
 
-       vecho ">>> Compiling source in $PWD ..."
+       __vecho ">>> Compiling source in $PWD ..."
        ebuild_phase src_compile
        >> "$PORTAGE_BUILDDIR/.compiled" || \
                die "Failed to create $PORTAGE_BUILDDIR/.compiled"
-       vecho ">>> Source compiled."
+       __vecho ">>> Source compiled."
 
        ebuild_phase post_src_compile
 
@@ -461,8 +461,8 @@ dyn_compile() {
 dyn_test() {
 
        if [[ -e $PORTAGE_BUILDDIR/.tested ]] ; then
-               vecho ">>> It appears that ${PN} has already been tested; skipping."
-               vecho ">>> Remove '${PORTAGE_BUILDDIR}/.tested' to force test."
+               __vecho ">>> It appears that ${PN} has already been tested; skipping."
+               __vecho ">>> Remove '${PORTAGE_BUILDDIR}/.tested' to force test."
                return
        fi
 
@@ -480,10 +480,10 @@ dyn_test() {
        fi
 
        if ! has test $FEATURES && [ "${EBUILD_FORCE_TEST}" != "1" ]; then
-               vecho ">>> Test phase [not enabled]: ${CATEGORY}/${PF}"
+               __vecho ">>> Test phase [not enabled]: ${CATEGORY}/${PF}"
        elif has test $RESTRICT; then
                einfo "Skipping make test/check due to ebuild restriction."
-               vecho ">>> Test phase [explicitly disabled]: ${CATEGORY}/${PF}"
+               __vecho ">>> Test phase [explicitly disabled]: ${CATEGORY}/${PF}"
        else
                local save_sp=${SANDBOX_PREDICT}
                addpredict /
@@ -503,8 +503,8 @@ dyn_install() {
        if has noauto $FEATURES ; then
                rm -f "${PORTAGE_BUILDDIR}/.installed"
        elif [[ -e $PORTAGE_BUILDDIR/.installed ]] ; then
-               vecho ">>> It appears that '${PF}' is already installed; skipping."
-               vecho ">>> Remove '${PORTAGE_BUILDDIR}/.installed' to force install."
+               __vecho ">>> It appears that '${PF}' is already installed; skipping."
+               __vecho ">>> Remove '${PORTAGE_BUILDDIR}/.installed' to force install."
                return 0
        fi
        trap "abort_install" SIGINT SIGQUIT
@@ -527,8 +527,8 @@ dyn_install() {
                die "The source directory '${S}' doesn't exist"
        fi
 
-       vecho
-       vecho ">>> Install ${PF} into ${D} category ${CATEGORY}"
+       __vecho
+       __vecho ">>> Install ${PF} into ${D} category ${CATEGORY}"
        #our custom version of libtool uses $S and $D to fix
        #invalid paths in .la files
        export S D
@@ -544,8 +544,8 @@ dyn_install() {
        ebuild_phase src_install
        >> "$PORTAGE_BUILDDIR/.installed" || \
                die "Failed to create $PORTAGE_BUILDDIR/.installed"
-       vecho ">>> Completed installing ${PF} into ${D}"
-       vecho
+       __vecho ">>> Completed installing ${PF} into ${D}"
+       __vecho
        ebuild_phase post_src_install
 
        cd "${PORTAGE_BUILDDIR}"/build-info
index 106e260178edd5e3399e98c7d5e8545d26b1d370..636336685d5eacb49f465ea51da72160a05457fe 100644 (file)
@@ -25,7 +25,7 @@ into() {
                        install -d "${ED}${DESTTREE}"
                        local ret=$?
                        if [[ $ret -ne 0 ]] ; then
-                               helpers_die "${FUNCNAME[0]} failed"
+                               __helpers_die "${FUNCNAME[0]} failed"
                                return $ret
                        fi
                fi
@@ -43,7 +43,7 @@ insinto() {
                        install -d "${ED}${INSDESTTREE}"
                        local ret=$?
                        if [[ $ret -ne 0 ]] ; then
-                               helpers_die "${FUNCNAME[0]} failed"
+                               __helpers_die "${FUNCNAME[0]} failed"
                                return $ret
                        fi
                fi
@@ -61,7 +61,7 @@ exeinto() {
                        install -d "${ED}${_E_EXEDESTTREE_}"
                        local ret=$?
                        if [[ $ret -ne 0 ]] ; then
-                               helpers_die "${FUNCNAME[0]} failed"
+                               __helpers_die "${FUNCNAME[0]} failed"
                                return $ret
                        fi
                fi
@@ -79,7 +79,7 @@ docinto() {
                        install -d "${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}"
                        local ret=$?
                        if [[ $ret -ne 0 ]] ; then
-                               helpers_die "${FUNCNAME[0]} failed"
+                               __helpers_die "${FUNCNAME[0]} failed"
                                return $ret
                        fi
                fi
@@ -279,7 +279,7 @@ unpack() {
        [ -z "$*" ] && die "Nothing passed to the 'unpack' command"
 
        for x in "$@"; do
-               vecho ">>> Unpacking ${x} to ${PWD}"
+               __vecho ">>> Unpacking ${x} to ${PWD}"
                y=${x%.*}
                y=${y##*.}
 
@@ -297,7 +297,7 @@ unpack() {
                _unpack_tar() {
                        if [ "${y}" == "tar" ]; then
                                $1 -c -- "$srcdir$x" | tar xof -
-                               assert_sigpipe_ok "$myfail"
+                               __assert_sigpipe_ok "$myfail"
                        else
                                local cwd_dest=${x##*/}
                                cwd_dest=${cwd_dest%.*}
@@ -315,7 +315,7 @@ unpack() {
                                ;;
                        tbz|tbz2)
                                ${PORTAGE_BUNZIP2_COMMAND:-${PORTAGE_BZIP2_COMMAND} -d} -c -- "$srcdir$x" | tar xof -
-                               assert_sigpipe_ok "$myfail"
+                               __assert_sigpipe_ok "$myfail"
                                ;;
                        ZIP|zip|jar)
                                # unzip will interactively prompt under some error conditions,
@@ -378,13 +378,13 @@ unpack() {
                                ;;
                        xz)
                                if has $eapi 0 1 2 ; then
-                                       vecho "unpack ${x}: file format not recognized. Ignoring."
+                                       __vecho "unpack ${x}: file format not recognized. Ignoring."
                                else
                                        _unpack_tar "xz -d"
                                fi
                                ;;
                        *)
-                               vecho "unpack ${x}: file format not recognized. Ignoring."
+                               __vecho "unpack ${x}: file format not recognized. Ignoring."
                                ;;
                esac
        done
@@ -433,7 +433,7 @@ econf() {
                        find "${WORKDIR}" -type f '(' \
                        -name config.guess -o -name config.sub ')' -print0 | \
                        while read -r -d $'\0' x ; do
-                               vecho " * econf: updating ${x/${WORKDIR}\/} with ${EPREFIX}/usr/share/gnuconfig/${x##*/}"
+                               __vecho " * econf: updating ${x/${WORKDIR}\/} with ${EPREFIX}/usr/share/gnuconfig/${x##*/}"
                                cp -f "${EPREFIX}"/usr/share/gnuconfig/"${x##*/}" "${x}"
                        done
                fi
@@ -491,7 +491,7 @@ econf() {
                        --localstatedir="${EPREFIX}"/var/lib \
                        "$@" \
                        ${EXTRA_ECONF}
-               vecho "${ECONF_SOURCE}/configure" "$@"
+               __vecho "${ECONF_SOURCE}/configure" "$@"
 
                if ! "${ECONF_SOURCE}/configure" "$@" ; then
 
@@ -587,15 +587,15 @@ _eapi0_src_test() {
                        ;;
        esac
        if $emake_cmd ${internal_opts} check -n &> /dev/null; then
-               vecho ">>> Test phase [check]: ${CATEGORY}/${PF}"
+               __vecho ">>> Test phase [check]: ${CATEGORY}/${PF}"
                $emake_cmd ${internal_opts} check || \
                        die "Make check failed. See above for details."
        elif $emake_cmd ${internal_opts} test -n &> /dev/null; then
-               vecho ">>> Test phase [test]: ${CATEGORY}/${PF}"
+               __vecho ">>> Test phase [test]: ${CATEGORY}/${PF}"
                $emake_cmd ${internal_opts} test || \
                        die "Make test failed. See above for details."
        else
-               vecho ">>> Test phase [none]: ${CATEGORY}/${PF}"
+               __vecho ">>> Test phase [none]: ${CATEGORY}/${PF}"
        fi
 }
 
index c09ce5b590a0a65a372ecef00931f889109d0540..f2deda225fe36758f2ffb13cde8c9a8d24ed925c 100644 (file)
@@ -46,11 +46,11 @@ save_ebuild_env() {
        done
        unset x
 
-       unset -f assert assert_sigpipe_ok \
-               dump_trace die \
-               quiet_mode vecho elog_base eqawarn elog \
-               einfo einfon ewarn eerror ebegin _eend eend KV_major \
-               KV_minor KV_micro KV_to_int get_KV unset_colors set_colors has \
+       unset -f assert __assert_sigpipe_ok \
+               __dump_trace die \
+               __quiet_mode __vecho __elog_base eqawarn elog \
+               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 \
@@ -63,7 +63,7 @@ save_ebuild_env() {
                abort_test abort_install dyn_prepare dyn_configure \
                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 \
+               debug-print-section __helpers_die inherit EXPORT_FUNCTIONS \
                nonfatal register_success_hook \
                save_ebuild_env filter_readonly_variables preprocess_ebuild_env \
                source_all_bashrcs \