From 0310d22a27aa2084c6eb3fa372bd50825d1a0998 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 7 Nov 2009 01:11:09 +0000 Subject: For --debug mode, enable bash tracing when sourcing the ebuild. (trunk r14781) svn path=/main/branches/2.1.7/; revision=14794 --- bin/ebuild.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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} -- cgit v1.2.3-1-g7c22