Merge "Don't die when yum fails."

This commit is contained in:
Jenkins 2016-01-11 17:01:33 +00:00 committed by Gerrit Code Review
commit 2cb3db338a

View File

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