diff -u b/src/journal.sh b/src/journal.sh --- b/src/journal.sh +++ b/src/journal.sh @@ -431,12 +431,10 @@ [[ -t 1 ]] && textfile="$__INTERNAL_BEAKERLIB_JOURNAL_COLORED" || textfile="$__INTERNAL_BEAKERLIB_JOURNAL_TXT" cat "$textfile" - local tmp="$__INTERNAL_LogText_no_file" - __INTERNAL_LogText_no_file=1 + local __INTERNAL_LogText_no_file=1 __INTERNAL_PrintHeadLog "${TEST}" 2>&1 __INTERNAL_LogText "Phases: $__INTERNAL_PHASES_PASSED good, $__INTERNAL_PHASES_FAILED bad" LOG 2>&1 __INTERNAL_LogText "RESULT: $TEST" $__INTERNAL_PHASES_WORST_RESULT 2>&1 - __INTERNAL_LogText_no_file=$tmp return 0 } @@ -645,6 +643,7 @@ # $2 result # $3 command rljAddTest(){ + local IFS __INTERNAL_PersistentDataLoad if [ $__INTERNAL_PHASE_OPEN -eq 0 ]; then rlPhaseStart "FAIL" "Asserts collected outside of a phase" @@ -723,6 +722,7 @@ # Creates header __INTERNAL_CreateHeader(){ + local IFS __INTERNAL_PrintHeadLog "TEST PROTOCOL" 2> /dev/null @@ -816,7 +816,7 @@ local count=0 local type="unknown" local cpu_regex="^model\sname.*: (.*)$" - while read line; do + while read -r line; do if [[ "$line" =~ $cpu_regex ]]; then type="${BASH_REMATCH[1]}" let count++ @@ -830,7 +830,7 @@ if [[ -f "/proc/meminfo" ]]; then size=0 local ram_regex="^MemTotal: *(.*) kB$" - while read line; do + while read -r line; do if [[ "$line" =~ $ram_regex ]]; then size=`expr ${BASH_REMATCH[1]} / 1024` break diff -u b/src/logging.sh b/src/logging.sh --- b/src/logging.sh +++ b/src/logging.sh @@ -53,10 +53,8 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __INTERNAL_PrintText() { - local tmp="$__INTERNAL_LogText_no_file" - __INTERNAL_LogText_no_file=1 + local __INTERNAL_LogText_no_file=1 __INTERNAL_LogText "$@" - __INTERNAL_LogText_no_file=$tmp } __INTERNAL_LogText() { @@ -531,6 +529,7 @@ rlShowPackageVersion() { local score=0 + local IFS if [ $# -eq 0 ]; then rlLogWarning "rlShowPackageVersion: Too few options" return 1 only in patch2: unchanged: --- a/src/analyze.sh +++ b/src/analyze.sh @@ -76,6 +76,7 @@ Return 0 if... TODO =cut rlDejaSum(){ + local IFS rlLog "Summarizing files: $1 $2" rlLogDebug "Calling beakerlib-deja-summarize routine" beakerlib-deja-summarize $1 $2 | while read line only in patch2: unchanged: --- a/src/libraries.sh +++ b/src/libraries.sh @@ -268,9 +268,10 @@ __INTERNAL_envdebugget() { __INTERNAL_envdebugdiff() { rlLogDebug "rlImport: library $1 changes following environment; changed functions are marked with asterisk (*)" diff -U0 <(echo "$__INTERNAL_envdebugvariables") <(__INTERNAL_envdebugget 1) | tail -n +3 | grep -E -v '^@@' - local line fn print='' print2 LF=" -" - while IFS= read line; do + local line fn print='' print2 LF=$'\n' + local IFS + + while read -r line; do [[ "$line" =~ ^(.)([^[:space:]]+)[[:space:]]\(\) ]] && { [[ -n "$print" ]] && { echo "$fn" only in patch2: unchanged: --- a/src/rpms.sh +++ b/src/rpms.sh @@ -56,6 +56,7 @@ __INTERNAL_RpmPresent() { local version=$3 local release=$4 local arch=$5 + local IFS local package=$name-$version-$release.$arch [ "$arch" == "" ] && package=$name-$version-$release only in patch2: unchanged: --- a/src/testing.sh +++ b/src/testing.sh @@ -749,6 +749,7 @@ rlRun() { local __INTERNAL_rlRun_TAG_OUT='' local __INTERNAL_rlRun_TAG_ERR='' local __INTERNAL_rlRun_LOG_FILE='' + local IFS while true ; do case "$1" in