]> git.deb.at Git - deb/packages.git/commitdiff
check-release: Simple frontend to Packages::Release
authorFrank Lichtenheld <frank@lichtenheld.de>
Fri, 25 Apr 2008 23:53:07 +0000 (01:53 +0200)
committerFrank Lichtenheld <frank@lichtenheld.de>
Sat, 26 Apr 2008 20:28:55 +0000 (22:28 +0200)
bin/check-release [new file with mode: 0755]
lib/Packages/Release.pm

diff --git a/bin/check-release b/bin/check-release
new file mode 100755 (executable)
index 0000000..2071133
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use lib './lib';
+
+use File::Basename;
+use Getopt::Long;
+use Packages::Release;
+
+my %opts;
+GetOptions(\%opts, 'verbose', 'ignoremissing', 'dieoncheckerror',
+          'keyring=s', 'directory=s')
+    or die "GetOptions failed\n";
+
+my @files = @ARGV;
+
+unless (@files) {
+    die "no release files specified\n";
+}
+
+foreach my $file (@files) {
+
+    $opts{file} = $file;
+    $opts{base} ||= dirname($file);
+    my $release = Packages::Release->new(\%opts);
+    $release->check;
+}
index 488233d86ce34dc81f19d6188e0b802c84ceb81a..6e8ea0811cf540c62c73a8839653fa7f619e92da 100644 (file)
@@ -98,10 +98,11 @@ sub check {
     $self->config(%$config) if $config;
 
     return unless $self->{config}{file};
+    $self->_v("checking Release file $self->{config}{file}\n");
     my $sigfile = "$self->{config}{file}.gpg";
 
     if ($self->{config}{keyring}) {
-       $self->_v("checking signature\n");
+       $self->_v("\tchecking signature\n");
 
        die "$self->{config}{keyring} not readable\n"
            unless -r $self->{config}{keyring};