Index: bin/prepstrip =================================================================== --- bin/prepstrip (revision 3164) +++ bin/prepstrip (working copy) @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepstrip,v 1.23.2.3 2005/08/15 02:58:20 vapier Exp $ +source /usr/lib/portage/bin/isolated-functions.sh + if [[ " ${FEATURES} " == *" nostrip "* ]] || \ [[ " ${RESTRICT} " == *" nostrip "* ]] || \ [[ " ${RESTRICT} " == *" strip "* ]] @@ -46,7 +48,7 @@ for x in $(scanelf -yRBF%F "$@") $(for y in "$@"; do find "${y}" -type f -name '*.a' -print0 ; done); do if [[ ${banner} -eq 1 ]] ; then - echo "strip: ${STRIP} ${PORTAGE_STRIP_FLAGS}" + vecho "strip: ${STRIP} ${PORTAGE_STRIP_FLAGS}" banner=0 fi @@ -64,11 +66,11 @@ set +o noglob if [[ ${f} == *"current ar archive"* ]] ; then - echo " ${x:${#D}:${#x}}" + vecho " ${x:${#D}:${#x}}" [[ ${stripitbaby} -eq 1 ]] && ${STRIP} -g "${x}" fi if [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* ]] ; then - echo " ${x:${#D}:${#x}}" + vecho " ${x:${#D}:${#x}}" save_elf_debug "${x}" [[ ${stripitbaby} -eq 1 ]] && ${STRIP} ${PORTAGE_STRIP_FLAGS} "${x}" fi Index: bin/prepallman =================================================================== --- bin/prepallman (revision 3164) +++ bin/prepallman (working copy) @@ -3,9 +3,11 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepallman,v 1.10 2004/10/04 13:56:50 vapier Exp $ +source /usr/lib/portage/bin/isolated-functions.sh + ret=0 -echo "man:" +vecho "man:" for x in "${D}"opt/*/man "${D}"usr/share/man "${D}"usr/local/man "${D}"usr/X11R6/man ; do if [[ -d ${x} ]] ; then x=${x#${D}} Index: bin/doman =================================================================== --- bin/doman (revision 3164) +++ bin/doman (working copy) @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: /var/cvsroot/gentoo-src/portage/bin/doman,v 1.13.2.2 2005/07/29 05:55:34 vapier Exp $ +source /usr/lib/portage/bin/isolated-functions.sh + if [[ $# -lt 1 ]] ; then echo "$0: at least one argument needed" 1>&2 exit 1 @@ -26,7 +28,7 @@ if [[ ${suffix} == "gz" ]] ; then realname=${x%.*} suffix=${realname##*.} - echo "QA Notice: you should let portage compress '${realname}' for you" 2>&1 + vecho "QA Notice: you should let portage compress '${realname}' for you" 2>&1 fi mandir=${i18n}man${suffix:0:1} Index: bin/prepman =================================================================== --- bin/prepman (revision 3164) +++ bin/prepman (working copy) @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepman,v 1.10.2.3 2005/05/29 12:40:08 jstubbs Exp $ +source /usr/lib/portage/bin/isolated-functions.sh + if [[ -z $1 ]] ; then z="${D}usr/share/man" else @@ -10,7 +12,7 @@ fi if [[ ! -d ${z} ]] ; then - echo "QA Notice: prepman called with non-existent dir '${z#${D}}'" 2>&1 + vecho "QA Notice: prepman called with non-existent dir '${z#${D}}'" 2>&1 exit 0 fi @@ -33,15 +35,15 @@ mylink="${mylink}.gz" fi - echo "fixing man page symlink: ${mylink##*/}" + vecho "fixing man page symlink: ${mylink##*/}" ln -snf "${linkto}" "${mylink}" if [[ ${y} != "${mylink}" ]] ; then - echo "removing old symlink: ${y##*/}" + vecho "removing old symlink: ${y##*/}" rm -f "${y}" fi else if [[ ${y##*.} != "gz" ]] && [[ ${y##*.} != "bz2" ]] && [[ ! -d ${y} ]] ; then - echo "gzipping man page: ${y##*/}" + vecho "gzipping man page: ${y##*/}" gzip -f -9 "${y}" fi fi Index: bin/misc-functions.sh =================================================================== --- bin/misc-functions.sh (revision 3164) +++ bin/misc-functions.sh (working copy) @@ -24,45 +24,50 @@ declare -i UNSAFE=0 for i in $(find "${D}/" -type f -perm -2002); do ((UNSAFE++)) - echo "UNSAFE SetGID: $i" + vecho "UNSAFE SetGID: $i" chmod -s,o-w "$i" done for i in $(find "${D}/" -type f -perm -4002); do ((UNSAFE++)) - echo "UNSAFE SetUID: $i" + vecho "UNSAFE SetUID: $i" chmod -s,o-w "$i" done # Now we look for all world writable files. for i in $(find "${D}/" -type f -perm -2); do - echo -ne '\a' - echo "QA Security Notice:" - echo "- ${i:${#D}:${#i}} will be a world writable file." - echo "- This may or may not be a security problem, most of the time it is one." - echo "- Please double check that $PF really needs a world writeable bit and file bugs accordingly." + vecho -ne '\a' + vecho "QA Security Notice:" + vecho "- ${i:${#D}:${#i}} will be a world writable file." + 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 done if type -p scanelf > /dev/null ; then - local qa_var insecure_rpath=0 - + local qa_var insecure_rpath=0 tmp_quiet=${PORTAGE_QUIET} + + # display warnings when using stricter because we die afterwards + if has stricter ${FEATURES}; then + unset PORTAGE_QUIET + fi + # Make sure we disallow insecure RUNPATH/RPATH's # Don't want paths that point to the tree where the package was built # (older, broken libtools would do this). Also check for null paths # because the loader will search $PWD when it finds null paths. f=$(scanelf -qyRF '%r %p' "${D}" | grep -E "(${PORTAGE_BUILDDIR}|: |::|^:|^ )") if [[ -n ${f} ]] ; then - echo -ne '\a\n' - echo "QA Notice: the following files contain insecure RUNPATH's" - echo " Please file a bug about this at http://bugs.gentoo.org/" - echo " with the maintaining herd of the package." - echo " Summary: $CATEGORY/$PN: insecure RPATH ${f}" - echo "${f}" - echo -ne '\a\n' + vecho -ne '\a\n' + vecho "QA Notice: the following files contain insecure RUNPATH's" + vecho " Please file a bug about this at http://bugs.gentoo.org/" + vecho " with the maintaining herd of the package." + vecho " Summary: $CATEGORY/$PN: insecure RPATH ${f}" + vecho "${f}" + vecho -ne '\a\n' if has stricter ${FEATURES}; then insecure_rpath=1 else - echo "Auto fixing rpaths for ${f}" + vecho "Auto fixing rpaths for ${f}" TMPDIR=${PORTAGE_BUILDDIR} scanelf -BXr ${f} -o /dev/null fi fi @@ -70,12 +75,12 @@ # Check for setid binaries but are not built with BIND_NOW f=$(scanelf -qyRF '%b %p' "${D}") if [[ -n ${f} ]] ; then - echo -ne '\a\n' - echo "QA Notice: the following files are setXid, dyn linked, and using lazy bindings" - echo " This combination is generally discouraged. Try re-emerging the package:" - echo " LDFLAGS='-Wl,-z,now' emerge ${PN}" - echo "${f}" - echo -ne '\a\n' + vecho -ne '\a\n' + vecho "QA Notice: the following files are setXid, dyn linked, and using lazy bindings" + vecho " This combination is generally discouraged. Try re-emerging the package:" + vecho " LDFLAGS='-Wl,-z,now' emerge ${PN}" + vecho "${f}" + vecho -ne '\a\n' die_msg="${die_msg} setXid lazy bindings," sleep 1 fi @@ -98,17 +103,17 @@ }') if [[ -n ${f} ]] ; then scanelf -qyRF '%T %p' "${PORTAGE_BUILDDIR}"/ &> "${T}"/scanelf-textrel.log - echo -ne '\a\n' - echo "QA Notice: the following files contain runtime text relocations" - echo " Text relocations force the dynamic linker to perform extra" - echo " work at startup, waste system resources, and may pose a security" - echo " risk. On some architectures, the code may not even function" - echo " properly, if at all." - echo " For more information, see http://hardened.gentoo.org/pic-fix-guide.xml" - echo " Please include this file in your report:" - echo " ${T}/scanelf-textrel.log" - echo "${f}" - echo -ne '\a\n' + vecho -ne '\a\n' + vecho "QA Notice: the following files contain runtime text relocations" + vecho " Text relocations force the dynamic linker to perform extra" + vecho " work at startup, waste system resources, and may pose a security" + vecho " risk. On some architectures, the code may not even function" + vecho " properly, if at all." + vecho " For more information, see http://hardened.gentoo.org/pic-fix-guide.xml" + vecho " Please include this file in your report:" + vecho " ${T}/scanelf-textrel.log" + vecho "${f}" + vecho -ne '\a\n' die_msg="${die_msg} textrels," sleep 1 fi @@ -146,16 +151,16 @@ if [[ -n ${f} ]] ; then # One more pass to help devs track down the source scanelf -qyRF '%e %p' "${PORTAGE_BUILDDIR}"/ &> "${T}"/scanelf-execstack.log - echo -ne '\a\n' - echo "QA Notice: the following files contain executable stacks" - echo " Files with executable stacks will not work properly (or at all!)" - echo " on some architectures/operating systems. A bug should be filed" - echo " at http://bugs.gentoo.org/ to make sure the file is fixed." - echo " For more information, see http://hardened.gentoo.org/gnu-stack.xml" - echo " Please include this file in your report:" - echo " ${T}/scanelf-execstack.log" - echo "${f}" - echo -ne '\a\n' + vecho -ne '\a\n' + vecho "QA Notice: the following files contain executable stacks" + vecho " Files with executable stacks will not work properly (or at all!)" + vecho " on some architectures/operating systems. A bug should be filed" + vecho " at http://bugs.gentoo.org/ to make sure the file is fixed." + vecho " For more information, see http://hardened.gentoo.org/gnu-stack.xml" + vecho " Please include this file in your report:" + vecho " ${T}/scanelf-execstack.log" + vecho "${f}" + vecho -ne '\a\n' die_msg="${die_msg} execstacks" sleep 1 fi @@ -168,6 +173,8 @@ elif [[ ${die_msg} != "" ]] && has stricter ${FEATURES} && ! has stricter ${RESTRICT} ; then die "Aborting due to QA concerns: ${die_msg}" fi + + PORTAGE_QUIET=${tmp_quiet} fi if [[ ${UNSAFE} > 0 ]] ; then @@ -286,23 +293,23 @@ # total suid control. if hasq suidctl $FEATURES; then sfconf=/etc/portage/suidctl.conf - echo ">>> Preforming suid scan in ${IMAGE}" + vecho ">>> Preforming suid scan in ${IMAGE}" for i in $(find ${IMAGE}/ -type f \( -perm -4000 -o -perm -2000 \) ); do if [ -s "${sfconf}" ]; then suid="$(grep ^${i/${IMAGE}/}$ ${sfconf})" if [ "${suid}" = "${i/${IMAGE}/}" ]; then - echo "- ${i/${IMAGE}/} is an approved suid file" + vecho "- ${i/${IMAGE}/} is an approved suid file" else - echo ">>> Removing sbit on non registered ${i/${IMAGE}/}" + vecho ">>> Removing sbit on non registered ${i/${IMAGE}/}" for x in 5 4 3 2 1 0; do echo -ne "\a"; sleep 0.25 ; done - echo -ne "\a" + vecho -ne "\a" chmod ugo-s "${i}" grep ^#${i/${IMAGE}/}$ ${sfconf} > /dev/null || { # sandbox prevents us from writing directly # to files outside of the sandbox, but this # can easly be bypassed using the addwrite() function addwrite "${sfconf}" - echo ">>> Appending commented out entry to ${sfconf} for ${PF}" + vecho ">>> Appending commented out entry to ${sfconf} for ${PF}" ls_ret=$(ls -ldh "${i}") echo "## ${ls_ret%${IMAGE}*}${ls_ret#*${IMAGE}}" >> ${sfconf} echo "#${i/${IMAGE}/}" >> ${sfconf} @@ -311,7 +318,7 @@ } fi else - echo "suidctl feature set but you are lacking a ${sfconf}" + vecho "suidctl feature set but you are lacking a ${sfconf}" fi done fi @@ -327,7 +334,7 @@ # only attempt to label if setfiles is executable # and 'context' is available on selinuxfs. if [ -f /selinux/context -a -x /usr/sbin/setfiles -a -x /usr/sbin/selinuxconfig ]; then - echo ">>> Setting SELinux security labels" + vecho ">>> Setting SELinux security labels" ( eval "$(/usr/sbin/selinuxconfig)" || \ die "Failed to determine SELinux policy paths."; @@ -339,7 +346,7 @@ else # nonfatal, since merging can happen outside a SE kernel # like during a recovery situation - echo "!!! Unable to set SELinux security labels" + vecho "!!! Unable to set SELinux security labels" fi fi } @@ -359,7 +366,7 @@ fi mv -f "${pkg_tmp}" "${pkg_dest}" || die "Failed to move tbz2 to ${pkg_dest}" ln -sf "../All/${PF}.tbz2" "${PKGDIR}/${CATEGORY}/${PF}.tbz2" || die "Failed to create symlink in ${PKGDIR}/${CATEGORY}" - echo ">>> Done." + vecho ">>> Done." cd "${PORTAGE_BUILDDIR}" touch .packaged || die "Failed to 'touch .packaged' in ${PORTAGE_BUILDDIR}" } Index: bin/prepinfo =================================================================== --- bin/prepinfo (revision 3164) +++ bin/prepinfo (working copy) @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepinfo,v 1.6.2.1 2005/05/29 12:40:08 jstubbs Exp $ +source /usr/lib/portage/bin/isolated-functions.sh + if [ -z "$1" ] ; then z="${D}usr/share/info" else @@ -30,15 +32,15 @@ mylink="${mylink}.gz" fi - echo "fixing GNU info symlink: ${mylink##*/}" + vecho "fixing GNU info symlink: ${mylink##*/}" ln -snf "${linkto}" "${mylink}" if [ "${x}" != "${mylink}" ] ; then - echo "removing old symlink: ${x##*/}" + vecho "removing old symlink: ${x##*/}" rm -f "${x}" fi else if [ "${x##*.}" != "gz" ] ; then - echo "gzipping GNU info page: ${x##*/}" + vecho "gzipping GNU info page: ${x##*/}" gzip -f -9 "${x}" fi fi Index: bin/prepalldocs =================================================================== --- bin/prepalldocs (revision 3164) +++ bin/prepalldocs (working copy) @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepalldocs,v 1.6 2004/10/04 13:56:50 vapier Exp $ +source /usr/lib/portage/bin/isolated-functions.sh + z="$(find "${D}"usr/share/doc \( -type f -or -type l \) -not -name "*.gz" -not -name "*.js" 2>/dev/null)" for y in ${z} ; do @@ -18,15 +20,15 @@ mylink="${mylink}.gz" fi - echo "fixing doc symlink: ${mylink##*/}" + vecho "fixing doc symlink: ${mylink##*/}" ln -snf "${linkto}" "${mylink}" if [ "${y}" != "${mylink}" ] ; then - echo "removing old symlink: ${y##*/}" + vecho "removing old symlink: ${y##*/}" rm -f "${y}" fi else if [ "${y##*.}" != "gz" ] ; then - echo "gzipping doc: ${y##*/}" + vecho "gzipping doc: ${y##*/}" gzip -f -9 "${y}" fi fi Index: bin/prepallinfo =================================================================== --- bin/prepallinfo (revision 3164) +++ bin/prepallinfo (working copy) @@ -3,7 +3,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepallinfo,v 1.6 2004/10/04 13:56:50 vapier Exp $ +source /usr/lib/portage/bin/isolated-functions.sh + [[ ! -d ${D}usr/share/info ]] && exit 0 -echo "info:" +vecho "info:" exec prepinfo Index: bin/doins =================================================================== --- bin/doins (revision 3164) +++ bin/doins (working copy) @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: /var/cvsroot/gentoo-src/portage/bin/doins,v 1.7.2.2 2004/12/17 22:25:13 carpaski Exp $ +source /usr/lib/portage/bin/isolated-functions.sh + if [ $# -lt 1 ] ; then echo "${0}: at least one argument needed" exit 1 @@ -21,10 +23,10 @@ fi if [ "${INSDESTTREE%${D}*}" == "" ]; then - echo "-------------------------------------------------------" 1>&2 - echo "You should not use \${D} with helpers." 1>&2 - echo " --> ${INSDESTTREE}" 1>&2 - echo "-------------------------------------------------------" 1>&2 + vecho "-------------------------------------------------------" 1>&2 + vecho "You should not use \${D} with helpers." 1>&2 + vecho " --> ${INSDESTTREE}" 1>&2 + vecho "-------------------------------------------------------" 1>&2 #exit 1 fi Index: bin/preplib =================================================================== --- bin/preplib (revision 3164) +++ bin/preplib (working copy) @@ -3,8 +3,10 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: /var/cvsroot/gentoo-src/portage/bin/preplib,v 1.7.2.1 2005/01/02 09:36:02 jstubbs Exp $ -echo "QA Notice: Please stop using me, fix your package instead" 1>&2 +source /usr/lib/portage/bin/isolated-functions.sh +vecho "QA Notice: Please stop using me, fix your package instead" 1>&2 + LIBDIR_VAR="LIBDIR_${ABI}" if [ -n "${ABI}" -a -n "${!LIBDIR_VAR}" ]; then CONF_LIBDIR="${!LIBDIR_VAR}" Index: bin/isolated-functions.sh =================================================================== --- bin/isolated-functions.sh (revision 3164) +++ bin/isolated-functions.sh (working copy) @@ -3,6 +3,10 @@ # $Header$ # Internal logging function, don't use this in ebuilds +vecho() { + [[ ${PORTAGE_QUIET} == "1" ]] || echo ${@} +} + elog_base() { local messagetype [ -z "${1}" -o -z "${T}" -o ! -d "${T}/logging" ] && return 1 @@ -12,7 +16,7 @@ shift ;; *) - echo -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 Index: bin/prepall =================================================================== --- bin/prepall (revision 3164) +++ bin/prepall (working copy) @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: prepall 2230 2005-11-01 01:35:59Z vapier $ +source /usr/lib/portage/bin/isolated-functions.sh + prepallman prepallinfo prepallstrip @@ -19,7 +21,7 @@ [[ ! -e ${j} ]] && continue [[ -L ${j} ]] && continue [[ -x ${j} ]] && continue - echo "making executable: /${j/${D}/}" + vecho "making executable: /${j/${D}/}" chmod +x "${j}" done @@ -27,7 +29,7 @@ [[ ! -e ${j} ]] && continue [[ -L ${j} ]] && continue [[ ! -x ${j} ]] && continue - echo "removing executable bit: /${j/${D}/}" + vecho "removing executable bit: /${j/${D}/}" chmod -x "${j}" done done @@ -41,7 +43,7 @@ if [[ ! -e ${s} ]] ; then s=${s%usr/*}${s##*/usr/} if [[ -e ${s} ]] ; then - echo -e "\aQA Notice: missing gen_usr_ldscript for ${s##*/}\a" + vecho -e "\aQA Notice: missing gen_usr_ldscript for ${s##*/}\a" sleep 1 fi fi @@ -50,8 +52,8 @@ # Make sure people don't store libtool files or static libs in /lib f=$(ls "${D}"lib*/*.{a,la} 2>/dev/null) if [[ -n ${f} ]] ; then - echo -e "\n\aQA Notice: excessive files found in the / partition\a" - echo "${f}" + vecho -e "\n\aQA Notice: excessive files found in the / partition\a" + vecho "${f}" sleep 1 fi @@ -59,7 +61,7 @@ for a in "${D}"usr/lib*/*.la ; do s=${a##*/} if grep -qs "${D}" "${a}" ; then - echo -e "\n\aQA Notice: ${s} appears to contain PORTAGE_TMPDIR paths\a" + vecho -e "\n\aQA Notice: ${s} appears to contain PORTAGE_TMPDIR paths\a" sleep 1 fi done @@ -70,17 +72,17 @@ for d in "${D}"lib* "${D}"usr/lib* ; do f=$(scanelf -ByF '%S %p' "${d}"/lib*.so* | gawk '$2 == "" { print }') if [[ -n ${f} ]] ; then - echo -e "\n\aQA Notice: the following shared libraries lack a SONAME\a" - echo "${f}" - echo + vecho -e "\n\aQA Notice: the following shared libraries lack a SONAME\a" + vecho "${f}" + vecho sleep 1 fi f=$(scanelf -ByF '%n %p' "${d}"/lib*.so* | gawk '$2 == "" { print }') if [[ -n ${f} ]] ; then - echo -e "\n\aQA Notice: the following shared libraries lack NEEDED entries\a" - echo "${f}" - echo + vecho -e "\n\aQA Notice: the following shared libraries lack NEEDED entries\a" + vecho "${f}" + vecho sleep 1 fi done Index: bin/doexe =================================================================== --- bin/doexe (revision 3164) +++ bin/doexe (working copy) @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: /var/cvsroot/gentoo-src/portage/bin/doexe,v 1.10.2.1 2004/12/06 03:01:43 carpaski Exp $ +source /usr/lib/portage/bin/isolated-functions.sh + if [[ $# -lt 1 ]] ; then echo "$0: at least one argument needed" 1>&2 exit 1 @@ -17,7 +19,7 @@ cp "${x}" "${T}" mysrc="${T}"/$(/usr/bin/basename "${x}") elif [ -d "${x}" ] ; then - echo "doexe: warning, skipping directory ${x}" + vecho "doexe: warning, skipping directory ${x}" continue else mysrc="${x}" Index: bin/ebuild.sh =================================================================== --- bin/ebuild.sh (revision 3164) +++ bin/ebuild.sh (working copy) @@ -117,7 +117,6 @@ return 0 } - use() { useq ${1} } @@ -142,7 +141,7 @@ # Make sure we have this USE flag in IUSE if ! hasq "${u}" ${IUSE} ${E_IUSE} && ! hasq "${u}" ${PORTAGE_ARCHLIST} selinux; then - echo "QA Notice: USE Flag '${u}' not in IUSE for ${CATEGORY}/${PF}" >&2 + vecho "QA Notice: USE Flag '${u}' not in IUSE for ${CATEGORY}/${PF}" >&2 fi if hasq ${u} ${USE} ; then @@ -350,7 +349,7 @@ [ -z "$*" ] && die "Nothing passed to the 'unpack' command" for x in "$@"; do - echo ">>> Unpacking ${x} to ${PWD}" + vecho ">>> Unpacking ${x} to ${PWD}" y=${x%.*} y=${y##*.} @@ -402,7 +401,7 @@ ar x "${srcdir}/${x}" || die "$myfail" ;; *) - echo "unpack ${x}: file format not recognized. Ignoring." + vecho "unpack ${x}: file format not recognized. Ignoring." ;; esac done @@ -429,7 +428,7 @@ if [ -x "${ECONF_SOURCE}/configure" ]; then if [ -e /usr/share/gnuconfig/ ]; then for x in $(find "${WORKDIR}" -type f '(' -name config.guess -o -name config.sub ')') ; do - echo " * econf: updating ${x/${WORKDIR}\/} with /usr/share/gnuconfig/${x##*/}" + vecho " * econf: updating ${x/${WORKDIR}\/} with /usr/share/gnuconfig/${x##*/}" cp -f /usr/share/gnuconfig/${x##*/} ${x} done fi @@ -496,7 +495,7 @@ CONFCACHE= fi - echo ${CONFCACHE} ${CONFCACHE_ARG} ${TMP_CONFCACHE_DIR} "${ECONF_SOURCE}/configure" \ + vecho ${CONFCACHE} ${CONFCACHE_ARG} ${TMP_CONFCACHE_DIR} "${ECONF_SOURCE}/configure" \ --prefix=/usr \ --host=${CHOST} \ --mandir=/usr/share/man \ @@ -598,19 +597,19 @@ src_test() { addpredict / if emake -j1 check -n &> /dev/null; then - echo ">>> Test phase [check]: ${CATEGORY}/${PF}" + vecho ">>> Test phase [check]: ${CATEGORY}/${PF}" if ! emake -j1 check; then hasq test $FEATURES && die "Make check failed. See above for details." hasq test $FEATURES || eerror "Make check failed. See above for details." fi elif emake -j1 test -n &> /dev/null; then - echo ">>> Test phase [test]: ${CATEGORY}/${PF}" + vecho ">>> Test phase [test]: ${CATEGORY}/${PF}" if ! emake -j1 test; then hasq test $FEATURES && die "Make test failed. See above for details." hasq test $FEATURES || eerror "Make test failed. See above for details." fi else - echo ">>> Test phase [none]: ${CATEGORY}/${PF}" + vecho ">>> Test phase [none]: ${CATEGORY}/${PF}" fi SANDBOX_PREDICT="${SANDBOX_PREDICT%:/}" } @@ -662,27 +661,27 @@ local x local checkme for x in ${AA}; do - echo ">>> Checking ${x}'s mtime..." + vecho ">>> Checking ${x}'s mtime..." if [ "${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/${x}" -nt "${WORKDIR}" ]; then - echo ">>> ${x} has been updated; recreating WORKDIR..." + vecho ">>> ${x} has been updated; recreating WORKDIR..." newstuff="yes" rm -rf "${WORKDIR}" break fi done if [ "${EBUILD}" -nt "${WORKDIR}" ]; then - echo ">>> ${EBUILD} has been updated; recreating WORKDIR..." + vecho ">>> ${EBUILD} has been updated; recreating WORKDIR..." newstuff="yes" rm -rf "${WORKDIR}" elif [ ! -f "${PORTAGE_BUILDDIR}/.unpacked" ]; then - echo ">>> Not marked as unpacked; recreating WORKDIR..." + vecho ">>> Not marked as unpacked; recreating WORKDIR..." newstuff="yes" rm -rf "${WORKDIR}" fi fi if [ -e "${WORKDIR}" ]; then if [ "$newstuff" == "no" ]; then - echo ">>> WORKDIR is up-to-date, keeping..." + vecho ">>> WORKDIR is up-to-date, keeping..." [ "$(type -t post_src_unpack)" == "function" ] && post_src_unpack return 0 fi @@ -692,10 +691,10 @@ install -m${PORTAGE_WORKDIR_MODE:-0700} -d "${WORKDIR}" || die "Failed to create dir '${WORKDIR}'" fi cd "${WORKDIR}" || die "Directory change failed: \`cd '${WORKDIR}'\`" - echo ">>> Unpacking source..." + vecho ">>> Unpacking source..." src_unpack touch "${PORTAGE_BUILDDIR}/.unpacked" || die "IO Failure -- Failed 'touch .unpacked' in ${PORTAGE_BUILDDIR}" - echo ">>> Source unpacked." + vecho ">>> Source unpacked." cd "${PORTAGE_BUILDDIR}" [ "$(type -t post_src_unpack)" == "function" ] && post_src_unpack @@ -908,8 +907,8 @@ cp "${EBUILD}" "build-info/${PF}.ebuild" if [ "${PORTAGE_BUILDDIR}/.compiled" -nt "${WORKDIR}" ]; then - echo ">>> It appears that ${PN} is already compiled; skipping." - echo ">>> (clean to force compilation)" + vecho ">>> It appears that ${PN} is already compiled; skipping." + vecho ">>> (clean to force compilation)" trap SIGINT SIGQUIT [ "$(type -t post_src_compile)" == "function" ] && post_src_compile return @@ -924,9 +923,9 @@ #some packages use an alternative to $S to build in, cause #our libtool to create problematic .la files export PWORKDIR="$WORKDIR" - echo ">>> Compiling source in ${srcdir} ..." + vecho ">>> Compiling source in ${srcdir} ..." src_compile - echo ">>> Source compiled." + vecho ">>> Source compiled." #|| abort_compile "fail" cd "${PORTAGE_BUILDDIR}" touch .compiled @@ -959,7 +958,7 @@ dyn_test() { [ "$(type -t pre_src_test)" == "function" ] && pre_src_test if [ "${PORTAGE_BUILDDIR}/.tested" -nt "${WORKDIR}" ]; then - echo ">>> It appears that ${PN} has already been tested; skipping." + vecho ">>> It appears that ${PN} has already been tested; skipping." [ "$(type -t post_src_test)" == "function" ] && post_src_test return fi @@ -969,9 +968,9 @@ fi if hasq test $RESTRICT; then ewarn "Skipping make test/check due to ebuild restriction." - echo ">>> Test phase [explicitly disabled]: ${CATEGORY}/${PF}" + vecho ">>> Test phase [explicitly disabled]: ${CATEGORY}/${PF}" elif ! hasq test $FEATURES; then - echo ">>> Test phase [not enabled]: ${CATEGORY}/${PF}" + vecho ">>> Test phase [not enabled]: ${CATEGORY}/${PF}" else src_test fi @@ -991,8 +990,8 @@ if [ -d "${S}" ]; then cd "${S}" fi - echo - echo ">>> 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 @@ -1001,8 +1000,8 @@ export PWORKDIR="$WORKDIR" src_install touch "${PORTAGE_BUILDDIR}/.installed" - echo ">>> Completed installing ${PF} into ${D}" - echo + vecho ">>> Completed installing ${PF} into ${D}" + vecho cd ${PORTAGE_BUILDDIR} [ "$(type -t post_src_install)" == "function" ] && post_src_install trap SIGINT SIGQUIT @@ -1150,9 +1149,9 @@ if [ "$EBUILD_PHASE" != "depend" ]; then if ! hasq $ECLASS $INHERITED; then - echo - echo "QA Notice: ECLASS '$ECLASS' inherited illegally in $CATEGORY/$PF" >&2 - echo + vecho + vecho "QA Notice: ECLASS '$ECLASS' inherited illegally in $CATEGORY/$PF" >&2 + vecho fi fi @@ -1412,11 +1411,11 @@ BODY="${BIN_PATH} \"\$@\"; return \$?" fi FUNC_SRC="${BIN}() { - echo -n \"QA Notice: ${BIN} in global scope: \" >&2 + vecho -n \"QA Notice: ${BIN} in global scope: \" >&2 if [ \$ECLASS_DEPTH -gt 0 ]; then - echo \"eclass \${ECLASS}\" >&2 + vecho \"eclass \${ECLASS}\" >&2 else - echo \"\${CATEGORY}/\${PF}\" >&2 + vecho \"\${CATEGORY}/\${PF}\" >&2 fi ${BODY} }";