Revert "Don't die when yum fails."

This reverts commit 2babf3963f4eea8558b0c287c51e6faeb7069c70.

This breaks oslo.messaging jobs:
http://logs.openstack.org/32/265932/1/check/gate-oslo.messaging-dsvm-functional-amqp1-centos7/f5f3eb9/console.html#_2016-01-11_20_03_33_162

@kgiusti reports that PIPESTATUS[0] is always 1 on his centos7 box

Change-Id: I013c22a3545f22c79a0616b4a98622d41bb17d77
This commit is contained in:
Davanum Srinivas (dims) 2016-01-11 21:20:34 +00:00 committed by Surojit Pathak
parent 2cb3db338a
commit ed9487a885

View File

@ -1334,17 +1334,13 @@ function yum_install {
BEGIN { fail=0 } BEGIN { fail=0 }
/No package/ { fail=1 } /No package/ { fail=1 }
{ print } { print }
END { exit fail }' END { exit fail }' || \
result=$? die $LINENO "Missing packages detected"
if [ $result != 0 ]; then # also ensure we catch a yum failure
echo $LINENO "Missing packages detected" if [[ ${PIPESTATUS[0]} != 0 ]]; then
elif [[ ${PIPESTATUS[0]} != 0 ]]; then die $LINENO "${YUM:-yum} install failure"
# also ensure we catch a yum failure
echo $LINENO "${YUM:-yum} install failure"
result=1
fi fi
return $result
} }
# zypper wrapper to set arguments correctly # zypper wrapper to set arguments correctly