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