From: Zac Medico Date: Fri, 6 Nov 2009 22:28:44 +0000 (-0000) Subject: For --debug mode, enable bash tracing when sourcing the ebuild. X-Git-Tag: v2.2_rc49~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=13aedc064cdabc01d8cca6697b642e30dca7050b;p=portage.git For --debug mode, enable bash tracing when sourcing the ebuild. svn path=/main/trunk/; revision=14781 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 25cd04bad..0a8fb41ab 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1823,7 +1823,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}