Skip to content

Commit 2cb3db3

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Don't die when yum fails."
2 parents 5453cdd + 2babf39 commit 2cb3db3

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

functions-common

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,13 +1334,17 @@ function yum_install {
13341334
BEGIN { fail=0 }
13351335
/No package/ { fail=1 }
13361336
{ print }
1337-
END { exit fail }' || \
1338-
die $LINENO "Missing packages detected"
1337+
END { exit fail }'
1338+
result=$?
13391339

1340-
# also ensure we catch a yum failure
1341-
if [[ ${PIPESTATUS[0]} != 0 ]]; then
1342-
die $LINENO "${YUM:-yum} install failure"
1340+
if [ $result != 0 ]; then
1341+
echo $LINENO "Missing packages detected"
1342+
elif [[ ${PIPESTATUS[0]} != 0 ]]; then
1343+
# also ensure we catch a yum failure
1344+
echo $LINENO "${YUM:-yum} install failure"
1345+
result=1
13431346
fi
1347+
return $result
13441348
}
13451349

13461350
# zypper wrapper to set arguments correctly

0 commit comments

Comments
 (0)