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

abe pushed a commit to branch master
in repository debsums.

commit 09ccdc7c594a48da231e91aea998a38fd2fb601e
Author: Anders Kaseorg <ande...@mit.edu>
Date:   Fri Jul 8 00:45:40 2011 -0400

    Keep track of packages by package specifier instead of name
    
    Signed-off-by: Anders Kaseorg <ande...@mit.edu>
---
 debsums | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/debsums b/debsums
index 9a51ce4..29cd72e 100755
--- a/debsums
+++ b/debsums
@@ -205,14 +205,15 @@ my %installed;
 my %replaced;
 {
     for my $fields (parse_dpkg(sub {'dpkg-query', "--admindir=$DPKG", @_, 
'--show'},
-                              [qw(Package Version Status Conffiles 
Replaces)])) {
+                              [qw(Package PackageSpec Version Status Conffiles 
Replaces)])) {
        my %field = %$fields;
-       next unless $field{Package} ne ''
+       $field{PackageSpec} = $field{Package} if $field{PackageSpec} eq '';
+       next unless $field{PackageSpec} ne ''
                and $field{Version} ne ''
                and $field{Status} =~ /\sinstalled$/;
 
-       $installed{$field{Package}}{Version} = $field{Version};
-       $installed{$field{Package}}{Conffiles} = {
+       $installed{$field{PackageSpec}}{Version} = $field{Version};
+       $installed{$field{PackageSpec}}{Conffiles} = {
            map m!^\s*/(\S+)\s+([\da-f]+)!, split /\n/, $field{Conffiles}
        } if $field{Conffiles};
 
@@ -221,11 +222,11 @@ my %replaced;
            my ($pack, $ver) = /^(\S+)(?:\s+\(([^)]+)\))?$/;
            unless ($pack)
            {
-               warn "$self: invalid Replaces for $field{Package} '$_'\n";
+               warn "$self: invalid Replaces for $field{PackageSpec} '$_'\n";
                next;
            }
 
-           push @{$replaced{$pack}{$ver || 'all'}}, $field{Package};
+           push @{$replaced{$pack}{$ver || 'all'}}, $field{PackageSpec};
        }
     }
 }
@@ -534,22 +535,23 @@ for (@ARGV)
 
        my $deb = $_;
        my ($fields) = parse_dpkg(sub {'dpkg-deb', @_, '--show', $deb},
-                                 [qw(Package Version Conffiles)])
+                                 [qw(Package PackageSpec Version Conffiles)])
          or do {
            warn "$self: $deb does not seem to be a valid debian archive\n";
            $status |= 1;
            next;
        };
        my %field = %$fields;
+       $field{PackageSpec} = $field{Package} if $field{PackageSpec} eq '';
 
-       unless ($field{Package} ne '' and $field{Version} ne '')
+       unless ($field{PackageSpec} ne '' and $field{Version} ne '')
        {
            warn "$self: $deb does not seem to be a valid debian archive\n";
            $status |= 1;
            next;
        }
 
-       $pack = $field{Package};
+       $pack = $field{PackageSpec};
        unless (exists $installed{$pack})
        {
            warn "$self: package $pack is not installed\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