1 |
Author: zmedico |
2 |
Date: 2009-09-08 01:51:26 +0000 (Tue, 08 Sep 2009) |
3 |
New Revision: 14215 |
4 |
|
5 |
Modified: |
6 |
main/trunk/bin/misc-functions.sh |
7 |
Log: |
8 |
Fix code from previous commit so it's guaranteed to always properly reset |
9 |
debug state. |
10 |
|
11 |
|
12 |
Modified: main/trunk/bin/misc-functions.sh |
13 |
=================================================================== |
14 |
--- main/trunk/bin/misc-functions.sh 2009-09-08 01:44:24 UTC (rev 14214) |
15 |
+++ main/trunk/bin/misc-functions.sh 2009-09-08 01:51:26 UTC (rev 14215) |
16 |
@@ -410,7 +410,11 @@ |
17 |
if [[ -n ${PORTAGE_LOG_FILE} && -r ${PORTAGE_LOG_FILE} ]] ; then |
18 |
# In debug mode, this variable definition will produce |
19 |
# a false positive if it's shown in the trace. |
20 |
- [[ $PORTAGE_DEBUG = 1 ]] && set +x |
21 |
+ local reset_debug=0 |
22 |
+ if [[ ${-/x/} != $- ]] ; then |
23 |
+ set +x |
24 |
+ reset_debug=1 |
25 |
+ fi |
26 |
local m msgs=( |
27 |
": warning: dereferencing type-punned pointer will break strict-aliasing rules$" |
28 |
": warning: dereferencing pointer .* does break strict-aliasing rules$" |
29 |
@@ -420,7 +424,7 @@ |
30 |
": warning: comparisons like X<=Y<=Z do not have their mathematical meaning$" |
31 |
": warning: null argument where non-null required " |
32 |
) |
33 |
- [[ $PORTAGE_DEBUG = 1 ]] && set -x |
34 |
+ [[ $reset_debug = 1 ]] && set -x |
35 |
abort="no" |
36 |
i=0 |
37 |
while [[ -n ${msgs[${i}]} ]] ; do |