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

abe pushed a commit to branch master
in repository debsums.

commit d9532d39bf45494ad1ba734872f524570994552d
Author: Anders Kaseorg <ande...@mit.edu>
Date:   Fri Jul 8 00:58:47 2011 -0400

    Use dpkg-deb instead of dpkg --field
    
    Signed-off-by: Anders Kaseorg <ande...@mit.edu>
---
 debsums | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/debsums b/debsums
index 278f19a..9a51ce4 100755
--- a/debsums
+++ b/debsums
@@ -533,10 +533,16 @@ for (@ARGV)
        }
 
        my $deb = $_;
-       my %field = map /^(\S+):\s+(.*)/ms, split /\n(?!\s)/,
-           `dpkg --field '$deb' Package Version Conffiles 2>/dev/null`;
+       my ($fields) = parse_dpkg(sub {'dpkg-deb', @_, '--show', $deb},
+                                 [qw(Package Version Conffiles)])
+         or do {
+           warn "$self: $deb does not seem to be a valid debian archive\n";
+           $status |= 1;
+           next;
+       };
+       my %field = %$fields;
 
-       unless (exists $field{Package} and $field{Version})
+       unless ($field{Package} ne '' and $field{Version} ne '')
        {
            warn "$self: $deb does not seem to be a valid debian archive\n";
            $status |= 1;

-- 
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