Browse code

Merge "Don't die when yum fails."

Jenkins authored on 2016/01/12 02:01:33
Showing 1 changed files
... ...
@@ -1334,13 +1334,17 @@ function yum_install {
1334 1334
             BEGIN { fail=0 }
1335 1335
             /No package/ { fail=1 }
1336 1336
             { print }
1337
-            END { exit fail }' || \
1338
-                die $LINENO "Missing packages detected"
1337
+            END { exit fail }'
1338
+        result=$?
1339 1339
 
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
1343 1346
     fi
1347
+    return $result
1344 1348
 }
1345 1349
 
1346 1350
 # zypper wrapper to set arguments correctly