summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/misc-functions.sh8
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