Browse code

Merge "Also detected failed packages in dnf/yum wrapper"

Jenkins authored on 2016/03/11 09:55:08
Showing 1 changed files
... ...
@@ -1324,15 +1324,16 @@ function yum_install {
1324 1324
 
1325 1325
     # Warning: this would not work if yum output message
1326 1326
     # have been translated to another language
1327
-    parse_yum_result='\
1328
-        BEGIN { result=0 }\
1329
-        /^YUM_FAILED/ { exit $2 }\
1330
-        /^No package/ { result=1 }\
1331
-        //{ print }\
1327
+    parse_yum_result='             \
1328
+        BEGIN { result=0 }         \
1329
+        /^YUM_FAILED/ { exit $2 }  \
1330
+        /^No package/ { result=1 } \
1331
+        /^Failed:/    { result=1 } \
1332
+        //{ print }                \
1332 1333
         END { exit result }'
1333 1334
 
1334 1335
     # The manual check for missing packages is because yum -y assumes
1335
-    # missing packages are OK.
1336
+    # missing or failed packages are OK.
1336 1337
     # See https://bugzilla.redhat.com/show_bug.cgi?id=965567
1337 1338
     (sudo_with_proxies "${YUM:-yum}" install -y "$@" 2>&1 || echo YUM_FAILED $?) \
1338 1339
         | awk "$parse_yum_result"