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
... | ... |
@@ -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 |