diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-03-22 23:47:03 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-03-22 23:47:03 +0000 |
commit | 1d304d0ab4e041092a447182f0a33a3129c8d215 (patch) | |
tree | 7c718b0955ec00a3d67a89c7bd3a2b8559a453db | |
parent | 71f3923d97d0e05e6d00b9de51e797d1af2fe7c5 (diff) | |
download | portage-1d304d0ab4e041092a447182f0a33a3129c8d215.tar.gz portage-1d304d0ab4e041092a447182f0a33a3129c8d215.tar.bz2 portage-1d304d0ab4e041092a447182f0a33a3129c8d215.zip |
Enable bash tracing during sourcing of bashrc for --debug mode. See bug #126442.
svn path=/main/trunk/; revision=2971
-rwxr-xr-x | bin/ebuild.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index d5e6ef682..410425d21 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -42,7 +42,15 @@ OCC="$CC" OCXX="$CXX" source /etc/profile.env &>/dev/null if [ -f "${PORTAGE_BASHRC}" ]; then - source "${PORTAGE_BASHRC}" + # If $- contains x, then tracing has already enabled elsewhere for some + # reason. We preserve it's state so as not to interfere. + if [ "$PORTAGE_DEBUG" != "1" ] || [ "${-/x/}" != "$-" ]; then + source "${PORTAGE_BASHRC}" + else + set -x + source "${PORTAGE_BASHRC}" + set +x + fi fi [ ! -z "$OCC" ] && export CC="$OCC" [ ! -z "$OCXX" ] && export CXX="$OCXX" |