Not all yum failures has to be considered
catastrofic failures also because install_package
function should implement the same behavior in Fedora,
CentOS and Ubuntu. Let return the error to be solved at higher
level.
Change-Id: Ia33bb98f47017f6ec00eb3b7261ed42d72efc573
Closes-Bug: #1522590
| ... | ... |
@@ -1300,13 +1300,17 @@ function yum_install {
|
| 1300 | 1300 |
BEGIN { fail=0 }
|
| 1301 | 1301 |
/No package/ { fail=1 }
|
| 1302 | 1302 |
{ print }
|
| 1303 |
- END { exit fail }' || \
|
|
| 1304 |
- die $LINENO "Missing packages detected" |
|
| 1303 |
+ END { exit fail }'
|
|
| 1304 |
+ result=$? |
|
| 1305 | 1305 |
|
| 1306 |
- # also ensure we catch a yum failure |
|
| 1307 |
- if [[ ${PIPESTATUS[0]} != 0 ]]; then
|
|
| 1308 |
- die $LINENO "${YUM:-yum} install failure"
|
|
| 1306 |
+ if [ $result != 0 ]; then |
|
| 1307 |
+ echo $LINENO "Missing packages detected" |
|
| 1308 |
+ elif [[ ${PIPESTATUS[0]} != 0 ]]; then
|
|
| 1309 |
+ # also ensure we catch a yum failure |
|
| 1310 |
+ echo $LINENO "${YUM:-yum} install failure"
|
|
| 1311 |
+ result=1 |
|
| 1309 | 1312 |
fi |
| 1313 |
+ return $result |
|
| 1310 | 1314 |
} |
| 1311 | 1315 |
|
| 1312 | 1316 |
# zypper wrapper to set arguments correctly |