This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch master
in repository debsums.

commit 32eb6ec4cdad04985a4d6f34ca57905b55888659
Author: Morgan Marquis-Boire <m...@google.com>
Date:   Wed Feb 15 16:08:59 2012 -0800

    Add a flag to report the expected and actual checksums of files checked
---
 debsums | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/debsums b/debsums
index beed62c..82cb1ac 100755
--- a/debsums
+++ b/debsums
@@ -68,6 +68,7 @@ Options:
  -l, --list-missing           list packages which don't have an md5sums file
  -s, --silent                 only report errors
  -m, --md5sums=FILE           read list of deb checksums from FILE
+ -x, --report-mismatches      report errors and print the md5sums mismatch
  -r, --root=DIR               root directory to check (default /)
  -d, --admindir=DIR           dpkg admin directory (default /var/lib/dpkg)
  -p, --deb-path=DIR[:DIR...]  search path for debs
@@ -88,6 +89,7 @@ GetOptions (
     'c|changed'                => \my $changed,
     'l|list-missing'    => \my $missing,
     's|silent'         => \my $silent,
+    'x|report-mismatches'   => \my $report,
     'm|md5sums=s'      => \my $md5sums,
     'r|root=s'         => \my $root,
     'd|admindir=s'     => \my $admindir,
@@ -526,13 +528,13 @@ sub resolve_path {
 
         if ($s eq $sum)
         {
-            printf "%-*s OK\n", $width, "$root/$path" unless $silent;
+            printf "%-*s OK\n", $width, "$root/$path" unless ($silent || 
$report);
             return 0;
         }
 
         if (is_replaced $pack, $path, $s)
         {
-            printf "%-*s REPLACED\n", $width - 6, "$root/$path" unless $silent;
+            printf "%-*s REPLACED\n", $width - 6, "$root/$path" unless 
($silent || $report);
             return 0;
         }
 
@@ -550,6 +552,12 @@ sub resolve_path {
             return 2;
         }
 
+        if ($report)
+        {
+            warn "$self: changed file $root/$path (observed:$s expected:$sum) 
(from $pack package)\n";
+            return 2;
+        }
+
         if ($silent)
         {
             warn "$self: changed file $root/$path (from $pack package)\n";

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/debsums.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to