Skip Menu |
 

This queue is for tickets about the Module-Signature CPAN distribution.

Report information
The Basics
Id: 17769
Status: resolved
Priority: 0/
Queue: Module-Signature

People
Owner: Nobody in particular
Requestors: adamk [...] cpan.org
Cc: ANDK [...] cpan.org
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.53
Fixed in: (no value)



CC: ANDK [...] cpan.org
Subject: Check for gpg fails noisily on Win32 with erroneous error.
Download (untitled) / with headers
text/plain 703b
When Module::Signature fails to find gpg, it does so noisily, adding a superfluous error to the console. The offending code is -------------------------------------------------------- Module::Signature::_has_gpg(c:/vanilla-perl/perl/site/lib/Module/Signature.pm:13 4): 134: `gpg --version` =~ /GnuPG.*?(\S+)$/m or return; DB<3> n 'gpg' is not recognized as an internal or external command, operable program or batch file. Module::Signature::_verify(c:/vanilla-perl/perl/site/lib/Module/Signature.pm:121 -------------------------------------------------------- The call to gpg needs to first verify that gpg actually exists, or in some other way avoid generating the extra STDERR messages.
Download (untitled) / with headers
text/plain 522b
128: warn "Cannot use GnuPG or Crypt::OpenPGP, please install either one first!\n"; While you are there, you need to remove that exclamation point. Well, unless the mere fact that Module::Signature is installed means it should have one of the two, in which case you have a bigger problem, because you are installing Module::Signature without the ability to check the remote pgp stuff. This is either critical and shouldn't install, or run of the mill. Perhaps it should even be a skip instead of a warning.
Download (untitled) / with headers
text/plain 268b
Show quoted text
> The call to gpg needs to first verify that gpg actually exists, or in > some other way avoid generating the extra STDERR messages.
The attached patches use the which() method from File::Which to find the gpg executable, and skip the system call if there isn't one.
Download Makefile.PL.patch
text/x-diff 275b
--- ..\Makefile.PL Fri Apr 21 13:56:51 2006 +++ Makefile.PL Fri Apr 21 14:45:02 2006 @@ -10,4 +10,6 @@ install_script 'script/cpansign'; +requires(qw/ File::Which 0.05 /); + requires (can_cc() ? 'Digest::SHA' : 'Digest::SHA::PurePerl') unless can_use 'Digest::SHA'
Download Signature.pm.patch
text/x-diff 470b
--- ..\Signature.pm Tue Jan 31 04:57:18 2006 +++ lib\Module\Signature.pm Fri Apr 21 14:43:49 2006 @@ -18,4 +18,5 @@ use ExtUtils::Manifest (); +use File::Which (); use Exporter; @@ -132,6 +133,9 @@ sub _has_gpg { - `gpg --version` =~ /GnuPG.*?(\S+)$/m or return; - return $1; + my $gpg = File::Which::which( 'gpg' ); + if (defined $gpg) { + `$gpg --version` =~ /GnuPG.*?(\S+)$/m or return; + return $1; + } }
Download (untitled) / with headers
text/plain 445b
On Fri Apr 21 09:55:40 2006, CFRANKS wrote: Show quoted text
> > The call to gpg needs to first verify that gpg actually exists, or in > > some other way avoid generating the extra STDERR messages.
> > The attached patches use the which() method from File::Which to find the > gpg executable, and skip the system call if there isn't one.
I believe the rewritten (but not yet released) Makefile.PL uses requires_external_bin, which takes care of that properly.
Download (untitled) / with headers
text/plain 172b
The latest Module::Signature version on cpan already uses requires_external_bin. In the hope of that being good enough, I'm closing this ticket. If it isn't, please reopen.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.