diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-09-08 01:51:26 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-09-08 01:51:26 +0000 |
commit | b0526977815637c3f44bb1f11d6e700a6250588e (patch) | |
tree | a1e9b346710fe41c99a51f9a876dbe583a19618b | |
parent | d21b3782acbbf37de35c357698afd70b8e7212e6 (diff) | |
download | portage-b0526977815637c3f44bb1f11d6e700a6250588e.tar.gz portage-b0526977815637c3f44bb1f11d6e700a6250588e.tar.bz2 portage-b0526977815637c3f44bb1f11d6e700a6250588e.zip |
Fix code from previous commit so it's guaranteed to always properly reset
debug state.
svn path=/main/trunk/; revision=14215
-rwxr-xr-x | bin/misc-functions.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index eee66eaa1..93d5eca6d 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -410,7 +410,11 @@ install_qa_check() { if [[ -n ${PORTAGE_LOG_FILE} && -r ${PORTAGE_LOG_FILE} ]] ; then # In debug mode, this variable definition will produce # a false positive if it's shown in the trace. - [[ $PORTAGE_DEBUG = 1 ]] && set +x + local reset_debug=0 + if [[ ${-/x/} != $- ]] ; then + set +x + reset_debug=1 + fi local m msgs=( ": warning: dereferencing type-punned pointer will break strict-aliasing rules$" ": warning: dereferencing pointer .* does break strict-aliasing rules$" @@ -420,7 +424,7 @@ install_qa_check() { ": warning: comparisons like X<=Y<=Z do not have their mathematical meaning$" ": warning: null argument where non-null required " ) - [[ $PORTAGE_DEBUG = 1 ]] && set -x + [[ $reset_debug = 1 ]] && set -x abort="no" i=0 while [[ -n ${msgs[${i}]} ]] ; do |