Open rurban opened 9 years ago
Since I cannot rely on Par::Dist to add support for tar, this is the code I came up with:
if (@ARGV and -e $ARGV[-1]) {
my $file = $ARGV[-1];
require PAR::Dist;
if ($file =~ /\.tar\.gz$/) {
*PAR::Dist::_unzip = sub {
my %args = &PAR::Dist::_args;
my $dist = $args{'dist'};
my $path = $args{'path'} || File::Spec->curdir;
return unless -f $dist;
system "tar xfz $dist -C $path";
};
}
PAR::Dist::_verify_or_sign(
dist => $file,
$dwim ? () : (action => $cmd, @args)
);
}
but it is missing the extracted dir of the dist, which needs to be added to the tmpdir.
EUMM has broken distsignature rules with parallel make (see https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/issues/177) so it would be nice to easier check the generated tar.gz, not only .zip. Add tar.gz support to
_unzip_to_tmpdir
Very often the generation of META.json is delayed, thus the SIGNATURE invalid.