[Pkg-privacy-commits] [msva-perl] 232/356: adjust gpgkey_hkpms using the standard gpg verbosity/debug settings
Ximin Luo
infinity0 at moszumanska.debian.org
Mon Aug 24 07:42:00 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository msva-perl.
commit 33571b5ce229697cf7e5017bbc27de0cdf5e0ea6
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Thu Dec 16 15:51:29 2010 -0500
adjust gpgkey_hkpms using the standard gpg verbosity/debug settings
---
gpgkeys_hkpms | 38 ++++++++++++++++++++++++++------------
1 file changed, 26 insertions(+), 12 deletions(-)
diff --git a/gpgkeys_hkpms b/gpgkeys_hkpms
index 4c18fbf..8022848 100755
--- a/gpgkeys_hkpms
+++ b/gpgkeys_hkpms
@@ -34,16 +34,28 @@ use warnings;
my @args = split(/ /, $line);
my $cmd = shift @args;
$self->{config}->{lc($cmd)} = join(' ', @args);
- # FIXME: consider other keyserver-options from gpg(1).
- # in particular, the following might be interesting:
- # debug
- # verbose
- # timeout
- # check-cert
- # include-revoked
- # include-disabled
- # ca-cert-file
- # http-proxy
+ if (lc($cmd) eq 'option') {
+ my $opt = lc($args[0]);
+ if ($opt eq 'debug') {
+ $self->{logger}->set_log_level('debug');
+ } elsif ($opt eq 'verbose') {
+ $self->{logger}->more_verbose();
+ } elsif ($opt eq 'no-check-cert') {
+ $self->{logger}->log('error', "Received no-check-cert option. Why are you bothering with hkpms if you aren't checking?\n");
+ $self->{actually_check} = 0;
+ } elsif ($opt eq 'check-cert') {
+ $self->{actually_check} = 1;
+ } else {
+ $self->{logger}->log('error', "Received '%s' as an option, but gpgkeys_hkpms does not implement it. Ignoring...\n");
+ }
+ # FIXME: consider other keyserver-options from gpg(1).
+ # in particular, the following might be interesting:
+ # timeout
+ # include-revoked
+ # include-disabled
+ # ca-cert-file
+ # http-proxy
+ }
}
} else {
push(@{$self->{args}}, $line);
@@ -217,18 +229,20 @@ use warnings;
sub new {
my $class = shift;
+ my $default_log_level = 'error';
my $client;
if (exists($ENV{MONKEYSPHERE_VALIDATION_AGENT_SOCKET})) {
$client = Crypt::Monkeysphere::MSVA::Client->new(
socket => $ENV{MONKEYSPHERE_VALIDATION_AGENT_SOCKET},
- log_level => $ENV{MSVA_LOG_LEVEL},
+ log_level => $default_log_level,
);
}
my $self = { config => { },
args => [ ],
- logger => Crypt::Monkeysphere::MSVA::Logger->new($ENV{MSVA_LOG_LEVEL}),
+ logger => (defined($client) ? $client->{logger} : Crypt::Monkeysphere::MSVA::Logger->new($default_log_level)),
cache => { },
client => $client,
+ actually_check => 1,
};
bless ($self, $class);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/msva-perl.git
More information about the Pkg-privacy-commits
mailing list