thaljef / Pinto

Curate your own repository of Perl modules
https://metacpan.org/module/Pinto::Manual
66 stars 49 forks source link

Cannot pull Term::ReadKey since v2.34 #240

Closed mschout closed 6 years ago

mschout commented 7 years ago

Today I discovered that Term::ReadKey no longer can be pulled into a pinto repository since v2.34.

Looking at Term::ReadKey v2.34, they changed it so that ReadKey.pm is generated (using PL_FILES in Makefile.PL):

PL_FILES     => { 'ReadKey_pm.PL' => 'ReadKey.pm' },

And so, the main module in the dist is ReadKey_pm.PL, not ReadKey.pm, and Pinto cant seem to figure out how to index it:

$ pinto -r jnk pull -vv -M Term::ReadKey
Pulling target Term::ReadKey~0 to stack master
Found Term::ReadKey~0 in http://cpan.stratopan.com/authors/id/J/JS/JSTOWE/TermReadKey2.37.tar.gz
Descending into prerequisites for JSTOWE/TermReadKey-2.37.tar.gz
Target Term::ReadKey~0 is already on stack master
No changes were made

But in fact, Term::ReadKey does NOT get added to the stack.

I'm not sure if this is something that should be somehow handled in META.json/yml of Term::ReadKey, or, if this is something that Pinto would need to deal with somehow.

pjcj commented 7 years ago

@mschout Have you been able to come up with any solution for this?

mschout commented 7 years ago

@pjcj No, I smiply pinned Term::ReadKey to an old version for now. I haven't had time to dig into Pinto internals to figure out how it handles parsing the dist. For now this is the solution I have stuck with.

mschout commented 7 years ago

@pjcj I got some time to run this through the debugger today and I figured it out.

Whats happening here is in Pinto::Schema::Result::Package, can_index() is returning 0 for this distribution. There are a few workarounds in there for other modules already, so I fixed it by adding a workaround for Term::ReadKey in that subroutine. I will create a PR for this shortly.