From b0526977815637c3f44bb1f11d6e700a6250588e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 8 Sep 2009 01:51:26 +0000 Subject: [PATCH] Fix code from previous commit so it's guaranteed to always properly reset debug state. svn path=/main/trunk/; revision=14215 --- bin/misc-functions.sh | 8 ++++++-- 1 file 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 -- 2.26.2