Browse code

Merge "Revert "Don't die when yum fails.""

Jenkins authored on 2016/01/13 23:03:30
Showing 1 changed files
... ...
@@ -1334,17 +1334,13 @@ function yum_install {
1334 1334
             BEGIN { fail=0 }
1335 1335
             /No package/ { fail=1 }
1336 1336
             { print }
1337
-            END { exit fail }'
1338
-        result=$?
1337
+            END { exit fail }' || \
1338
+                die $LINENO "Missing packages detected"
1339 1339
 
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
1340
+    # also ensure we catch a yum failure
1341
+    if [[ ${PIPESTATUS[0]} != 0 ]]; then
1342
+        die $LINENO "${YUM:-yum} install failure"
1346 1343
     fi
1347
-    return $result
1348 1344
 }
1349 1345
 
1350 1346
 # zypper wrapper to set arguments correctly