From: Frank Lichtenheld Date: Fri, 25 Apr 2008 23:53:07 +0000 (+0200) Subject: check-release: Simple frontend to Packages::Release X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=24d90ece880a98242a02dcae6d4d8d076b7cdf95;p=deb%2Fpackages.git check-release: Simple frontend to Packages::Release --- diff --git a/bin/check-release b/bin/check-release new file mode 100755 index 0000000..2071133 --- /dev/null +++ b/bin/check-release @@ -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; +} diff --git a/lib/Packages/Release.pm b/lib/Packages/Release.pm index 488233d..6e8ea08 100644 --- a/lib/Packages/Release.pm +++ b/lib/Packages/Release.pm @@ -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};