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$"
": 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