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

Update to v1 of MetaCPAN API #1341

Merged
merged 1 commit into from Jun 5, 2017

Conversation

Projects
None yet
2 participants
@rjbell4
Contributor

rjbell4 commented Jun 5, 2017

Support for v0 of the MetaCPAN API has been removed in the last few days, completely breaking fpm's ability to package CPAN modules. I'm new to both Ruby and this service, but a quick scanning of the docs and some other online resources led me to this relatively small change, which seems to work well to adjust to the new API.

Fixes #1336

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Jun 5, 2017

This seems to search cpan correctly but it fails to use modules correctly -- can you help?

Here's what I did to test it:

% bin/fpm -s cpan -t deb Regexp::Common

Process failed: cpanm failed (exit code 1). Full command was:["cpanm", "-L", "/tmp/package-cpan-build-8a683e3bf1f9bc347d6c108d3bb713bdb77f2cac9d8d7e3100ea201a2a4c/cpan", "/tmp/package-cpan-build-8a683e3bf1f9bc347d6c108d3bb713bdb77f2cac9d8d7e3100ea201a2a4c/module", "--installdeps"] {:level=>:error}
@rjbell4

This comment has been minimized.

Contributor

rjbell4 commented Jun 5, 2017

I can take a peek. Honestly, I had some trouble with dependencies from the get-go (before MetaCPAN dropped support for v0, even). I wound up installing all dependencies first, and then letting fpm just handle each module explicitly. I never researched why.

@rjbell4

This comment has been minimized.

Contributor

rjbell4 commented Jun 5, 2017

That example actually worked fine for me on my SLES12 SP1 environment (and worked targeting rpm, too).

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Jun 5, 2017

hmm, trying it manually I get this:

% "cpanm" "-L" "/tmp/package-cpan-build-c736e2350f7365ebe9e8ae07cac00c5700913c0633aa07c51548b76cde8c/cpan" "/tmp/package-cpan-build-c736e2350f7365ebe9e8ae07cac00c5700913c0633aa07c51548b76cde8c/module" "--installdeps"
--> Working on /tmp/package-cpan-build-c736e2350f7365ebe9e8ae07cac00c5700913c0633aa07c51548b76cde8c/module
Module::CoreList 5.20150920 (loaded from /usr/share/perl5/vendor_perl/Module/CoreList.pm) doesn't seem to have entries for perl 5.022002. You're strongly recommended to upgrade Module::CoreList from CPAN.

I'm not quite sure what to make of this. It seems like I need to upgrade Module::CoreList but cpanm Module::CoreList has no impact on this error.

@rjbell4

This comment has been minimized.

Contributor

rjbell4 commented Jun 5, 2017

FYI, it also worked on my Ubuntu 16.10 machine (which is running Perl 5.22.2, as you seem to also be using)

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Jun 5, 2017

@rjbell4 good enough for me, thank you :)

@jordansissel jordansissel merged commit b930bcc into jordansissel:master Jun 5, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rjbell4 rjbell4 deleted the rjbell4:metacpan-v1 branch Jun 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment