Blame SOURCES/BZ-1406891-verify-exit-status.patch

47f05a
commit f62551849e0f8c5cc3151d78af0975fad831e8ed
47f05a
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
47f05a
Date:   Tue Oct 18 10:31:11 2016 +0200
47f05a
47f05a
    yum-plugin-verify: set exit status to 1 in case of problems.
47f05a
47f05a
diff --git a/plugins/verify/verify.py b/plugins/verify/verify.py
47f05a
index 108f96e..94eca26 100644
47f05a
--- a/plugins/verify/verify.py
47f05a
+++ b/plugins/verify/verify.py
47f05a
@@ -287,6 +287,7 @@ Verify packages and display data on bad verifications"""
47f05a
         
47f05a
     def show_data(self, base, msg, pkgs, name):
47f05a
         done = False
47f05a
+        problem_found = False
47f05a
         mcb = lambda x: base.matchcallback(x, [])
47f05a
         for (pkg, results) in self.filter_data(msg, pkgs):
47f05a
             if not done:
47f05a
@@ -310,11 +311,13 @@ Verify packages and display data on bad verifications"""
47f05a
                     (hib, hie) = ("", "")
47f05a
                 done_prob = False
47f05a
                 for problem in sorted(results[fname]):
47f05a
+                    problem_found = True
47f05a
                     if not done_prob and problem.file_types:
47f05a
                         tags = ", ".join(problem.file_types)
47f05a
                         msg("    Tags: " + hib + tags + hie)
47f05a
                     self.show_problem(base, msg, problem, done_prob)
47f05a
                     done_prob = True
47f05a
+        return problem_found
47f05a
 
47f05a
     def doCommand(self, base, basecmd, extcmds):
47f05a
         global _verify_configs
47f05a
@@ -360,10 +363,10 @@ Verify packages and display data on bad verifications"""
47f05a
             # nevr() match
47f05a
             
47f05a
         ypl = base.returnPkgLists(subgroup + extcmds)
47f05a
-        self.show_data(base, msg, ypl.installed, 'Installed Packages')
47f05a
-        self.show_data(base, msg, ypl.extras,    'Extra Packages')
47f05a
+        result = (self.show_data(base, msg, ypl.installed, 'Installed Packages')
47f05a
+                  or self.show_data(base, msg, ypl.extras,    'Extra Packages'))
47f05a
 
47f05a
-        return 0, [basecmd + ' done']
47f05a
+        return result, [basecmd + ' done']
47f05a
 
47f05a
     def needTs(self, base, basecmd, extcmds):
47f05a
         if not len(extcmds) or extcmds[0] != 'extras':
47f05a
47f05a
commit 7a94cf4434107bfcb32e60420af2106b993c7381
47f05a
Author: Michal Domonkos <mdomonko@redhat.com>
47f05a
Date:   Thu Feb 16 17:47:53 2017 +0100
47f05a
47f05a
    docs: verify: fix wording. BZ 1406891
47f05a
47f05a
diff --git a/docs/yum-verify.1 b/docs/yum-verify.1
47f05a
index 5246a1c..1a8cc11 100644
47f05a
--- a/docs/yum-verify.1
47f05a
+++ b/docs/yum-verify.1
47f05a
@@ -6,7 +6,7 @@ yum verify plugin
47f05a
 \fByum\fP [options] verify [package ...]
47f05a
 .SH "DESCRIPTION"
47f05a
 .PP 
47f05a
-This plugin extends \fByum\fP with some commands that give verification information on the installed system, much like rpm \-V. You can change how the verification is done and which files it applies to.
47f05a
+This plugin extends \fByum\fP with some commands that give verification information on the installed system, much like rpm \-V. You can change how the verification is done and which files it applies to. In case any mismatches are found, the exit status is set to 1.
47f05a
 .PP 
47f05a
 added yum \fIcommand\fPs are:
47f05a
 .br 
47f05a
@@ -17,7 +17,7 @@ added yum \fIcommand\fPs are:
47f05a
 .I \fR * verify-all
47f05a
 .br 
47f05a
 .PP 
47f05a
-all of which take the same arguments as the list yum command, obviously you can
47f05a
+all of which take the same arguments as the list yum command. You can
47f05a
 only verify packages that are installed on the system.
47f05a
 .PP
47f05a
 .br 
47f05a
@@ -29,8 +29,7 @@ output. It removes all false matches due to multilib and ignores changes to
47f05a
 configuration files by default.
47f05a
 .IP
47f05a
 .IP "\fBverify-rpm\fP"
47f05a
-Is meant to be 100% compatible with rpm \-V output, and any differences should be
47f05a
-considered as bugs.
47f05a
+Does the same checks as rpm \-V.
47f05a
 .IP
47f05a
 .IP "\fBverify-all\fP"
47f05a
 Is used to list all the differences, including some that rpm itself will ignore.