Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature req: cpansign -v <distname>.tar.gz #6

Open
rurban opened this issue Dec 20, 2014 · 1 comment
Open

Feature req: cpansign -v <distname>.tar.gz #6

rurban opened this issue Dec 20, 2014 · 1 comment

Comments

@rurban
Copy link

rurban commented Dec 20, 2014

EUMM has broken distsignature rules with parallel make (see Perl-Toolchain-Gang/ExtUtils-MakeMaker#177) so it would be nice to easier check the generated tar.gz, not only .zip.
Add tar.gz support to _unzip_to_tmpdir

make dist # with SIGN=>1
cpansign -v <generated-tar.gz>

Very often the generation of META.json is delayed, thus the SIGNATURE invalid.

@rurban
Copy link
Author

rurban commented Dec 20, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant