From 24d90ece880a98242a02dcae6d4d8d076b7cdf95 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sat, 26 Apr 2008 01:53:07 +0200 Subject: [PATCH] check-release: Simple frontend to Packages::Release --- bin/check-release | 28 ++++++++++++++++++++++++++++ lib/Packages/Release.pm | 3 ++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100755 bin/check-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}; -- 2.39.2