From: Brian Harring Date: Fri, 14 Sep 2012 05:14:01 +0000 (-0700) Subject: Convert funcs of isolated-functions.sh to __ prefixed namespace. X-Git-Tag: v2.2.0_alpha129~27 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9b19ac5696c487dab58d7c10990fe07fd7f1f731;p=portage.git Convert funcs of isolated-functions.sh to __ prefixed namespace. --- diff --git a/bin/ebuild-helpers/dobin b/bin/ebuild-helpers/dobin index f90d8933c..06ae0c779 100755 --- a/bin/ebuild-helpers/dobin +++ b/bin/ebuild-helpers/dobin @@ -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} diff --git a/bin/ebuild-helpers/doconfd b/bin/ebuild-helpers/doconfd index e14600022..a3c09a50e 100755 --- a/bin/ebuild-helpers/doconfd +++ b/bin/ebuild-helpers/doconfd @@ -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 diff --git a/bin/ebuild-helpers/dodir b/bin/ebuild-helpers/dodir index 90a3efed4..c8f763deb 100755 --- a/bin/ebuild-helpers/dodir +++ b/bin/ebuild-helpers/dodir @@ -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 diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc index d6ce67933..2b0533feb 100755 --- a/bin/ebuild-helpers/dodoc +++ b/bin/ebuild-helpers/dodoc @@ -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} diff --git a/bin/ebuild-helpers/doenvd b/bin/ebuild-helpers/doenvd index 28ab5d234..9287933a9 100755 --- a/bin/ebuild-helpers/doenvd +++ b/bin/ebuild-helpers/doenvd @@ -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 diff --git a/bin/ebuild-helpers/doexe b/bin/ebuild-helpers/doexe index fb228f905..efbf638fc 100755 --- a/bin/ebuild-helpers/doexe +++ b/bin/ebuild-helpers/doexe @@ -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 diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader index c51ec1ed9..fa1156404 100755 --- a/bin/ebuild-helpers/doheader +++ b/bin/ebuild-helpers/doheader @@ -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 diff --git a/bin/ebuild-helpers/dohtml b/bin/ebuild-helpers/dohtml index 630629a4b..aec5e79bd 100755 --- a/bin/ebuild-helpers/dohtml +++ b/bin/ebuild-helpers/dohtml @@ -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 diff --git a/bin/ebuild-helpers/doinfo b/bin/ebuild-helpers/doinfo index 8fd7d45f8..e4ccc90d9 100755 --- a/bin/ebuild-helpers/doinfo +++ b/bin/ebuild-helpers/doinfo @@ -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 diff --git a/bin/ebuild-helpers/doinitd b/bin/ebuild-helpers/doinitd index b711e190a..476b858f6 100755 --- a/bin/ebuild-helpers/doinitd +++ b/bin/ebuild-helpers/doinitd @@ -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 diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins index 26b11a869..c534f3f39 100755 --- a/bin/ebuild-helpers/doins +++ b/bin/ebuild-helpers/doins @@ -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 diff --git a/bin/ebuild-helpers/dolib b/bin/ebuild-helpers/dolib index 9af541890..402965de7 100755 --- a/bin/ebuild-helpers/dolib +++ b/bin/ebuild-helpers/dolib @@ -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} diff --git a/bin/ebuild-helpers/doman b/bin/ebuild-helpers/doman index b4047ce40..c10296b34 100755 --- a/bin/ebuild-helpers/doman +++ b/bin/ebuild-helpers/doman @@ -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} diff --git a/bin/ebuild-helpers/domo b/bin/ebuild-helpers/domo index d994343a9..840b2de4c 100755 --- a/bin/ebuild-helpers/domo +++ b/bin/ebuild-helpers/domo @@ -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 diff --git a/bin/ebuild-helpers/dosbin b/bin/ebuild-helpers/dosbin index d101c8a6d..edc458465 100755 --- a/bin/ebuild-helpers/dosbin +++ b/bin/ebuild-helpers/dosbin @@ -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} diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym index 2489e22a2..34637c2f7 100755 --- a/bin/ebuild-helpers/dosym +++ b/bin/ebuild-helpers/dosym @@ -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 diff --git a/bin/ebuild-helpers/ecompress b/bin/ebuild-helpers/ecompress index b61421b00..71287b4b0 100755 --- a/bin/ebuild-helpers/ecompress +++ b/bin/ebuild-helpers/ecompress @@ -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 diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir index 5ca0d3a35..097ade2bc 100755 --- a/bin/ebuild-helpers/ecompressdir +++ b/bin/ebuild-helpers/ecompressdir @@ -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} diff --git a/bin/ebuild-helpers/emake b/bin/ebuild-helpers/emake index d842781a7..69d836f1a 100755 --- a/bin/ebuild-helpers/emake +++ b/bin/ebuild-helpers/emake @@ -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 diff --git a/bin/ebuild-helpers/fowners b/bin/ebuild-helpers/fowners index a213c9eb1..5b93fd3c3 100755 --- a/bin/ebuild-helpers/fowners +++ b/bin/ebuild-helpers/fowners @@ -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 diff --git a/bin/ebuild-helpers/fperms b/bin/ebuild-helpers/fperms index a2f77ea00..668e905a2 100755 --- a/bin/ebuild-helpers/fperms +++ b/bin/ebuild-helpers/fperms @@ -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 diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins index 54245f3bc..20c68a1e2 100755 --- a/bin/ebuild-helpers/newins +++ b/bin/ebuild-helpers/newins @@ -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 diff --git a/bin/ebuild-helpers/prepalldocs b/bin/ebuild-helpers/prepalldocs index c9226d603..50b0c7070 100755 --- a/bin/ebuild-helpers/prepalldocs +++ b/bin/ebuild-helpers/prepalldocs @@ -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 "* ]] || \ diff --git a/bin/ebuild-helpers/prepinfo b/bin/ebuild-helpers/prepinfo index ffe2ecec3..e213f32d1 100755 --- a/bin/ebuild-helpers/prepinfo +++ b/bin/ebuild-helpers/prepinfo @@ -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 diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip index 2556ee240..802fdd826 100755 --- a/bin/ebuild-helpers/prepstrip +++ b/bin/ebuild-helpers/prepstrip @@ -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 | \ diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index a962ab548..09b75746c 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -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 diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 154506e67..076e31f43 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -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 diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 9eec8bb69..5bc946fc1 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -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}" diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index e50b34033..34e9da12d 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -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 diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 106e26017..636336685 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -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 } diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh index c09ce5b59..f2deda225 100644 --- a/bin/save-ebuild-env.sh +++ b/bin/save-ebuild-env.sh @@ -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 \