From: Zac Medico Date: Sat, 7 Nov 2009 01:11:09 +0000 (-0000) Subject: For --debug mode, enable bash tracing when sourcing the ebuild. (trunk r14781) X-Git-Tag: v2.1.7.4~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0310d22a27aa2084c6eb3fa372bd50825d1a0998;p=portage.git For --debug mode, enable bash tracing when sourcing the ebuild. (trunk r14781) svn path=/main/branches/2.1.7/; revision=14794 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 658ac64af..7a4e88bd8 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1829,7 +1829,14 @@ if ! hasq "$EBUILD_PHASE" clean cleanrm ; then # eclasses, they need to be unset before this process of # interaction begins. unset DEPEND RDEPEND PDEPEND IUSE - source "${EBUILD}" || die "error sourcing ebuild" + + if [[ $PORTAGE_DEBUG != 1 ]] || [[ ${-/x/} != $- ]] ; then + source "$EBUILD" || die "error sourcing ebuild" + else + set -x + source "$EBUILD" || die "error sourcing ebuild" + set +x + fi if [[ "${EBUILD_PHASE}" != "depend" ]] ; then RESTRICT=${PORTAGE_RESTRICT}