[debsums] 184/184: Warn if found md5sums file is empty. (Closes: #577197)

Axel Beckert abe at deuxchevaux.org
Mon Mar 2 21:21:31 UTC 2015


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

abe pushed a commit to branch master
in repository debsums.

commit 58f444b45a5c3f80fa40e9fd672788dc6f05c57a
Author: Axel Beckert <abe at deuxchevaux.org>
Date:   Sat Feb 7 01:27:38 2015 +0100

    Warn if found md5sums file is empty. (Closes: #577197)
---
 debian/changelog |  1 +
 debsums          | 14 +++++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index dab0f6b..330592b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,7 @@ debsums (2.1~dev) UNRELEASED; urgency=medium
   * debsums:
     + Apply patch by Vladimir N. Solovyov to also report modified files of
       arch-qualified (multiarch) packages. (Closes: #773136)
+    + Warn if found md5sums file is empty. (Closes: #577197)
     + Remove obsolete CVS keywords.
     + Quote HERE document delimiters to ease syntax highlighting and
       please perlcritic.
diff --git a/debsums b/debsums
index 3115f65..cd153aa 100755
--- a/debsums
+++ b/debsums
@@ -321,15 +321,23 @@ sub md5sums_path
     # so we cheat a little bit.
 
     my ($pack) = @_;
+    my $path = '';
     if (-e "$DPKG/info/$pack.list") {
-        return "$DPKG/info/$pack.md5sums";
+        $path = "$DPKG/info/$pack.md5sums";
     } elsif ($pack !~ /:/ and -e "$DPKG/info/$pack:$arch.list") {
-        return "$DPKG/info/$pack:$arch.md5sums";
+        $path = "$DPKG/info/$pack:$arch.md5sums";
     } elsif ($pack =~ /^(.*):/ and -e "$DPKG/info/$1.list") {
-        return "$DPKG/info/$1.md5sums";
+        $path = "$DPKG/info/$1.md5sums";
     } else {
         die "Cannot find md5sums path for $pack\n";
     }
+
+    if (-e $path and -z _) {
+        warn "$path is empty!\n";
+        $status |= 2;
+    }
+
+    return $path;
 }
 
 sub is_replaced

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



More information about the Pkg-perl-cvs-commits mailing list