thaljef / Pinto

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

Error: Cannot find inc::MMPackageStash~0 anywhere #250

Open gugod opened 5 years ago

gugod commented 5 years ago

I'm running into this error message when pulling Teng

> pinto -v --no-color --root ~/pinto pull Teng~0.29 
Pulling target Teng~0.29 to stack master
Descending into prerequisites for SATOH/Teng-0.31.tar.gz
Cannot find inc::MMPackageStash~0 anywhere

The destribution of Teng does not contain any reference to inc::MMPackageStash. Other than that I haven't look deeper into this myself, but I though it'd be nice to share this problem first.

gugod commented 5 years ago

I havn't found what introduces inc::MMPackageStash, but this can be trace down to File::ShareDir -- one of deep dependencies from Teng.

All direct dependencies of File::ShareDir -- Carp, Class::Inspector, and File::Spec -- can be pulled without this issue. However, the tarball ofFile::ShareDir does not contain reference to inc::MMPackageStash.

So far I have to work-around this issue by ignore this particular prerequisties with -k inc::MMPackageStash.

jhannah commented 5 years ago

I'm having the same problem today. :/

PINTO_DEBUG=1 Archive /var/folders/5n/m77knmkj23d0vddk3z9s8xcr0000gn/T/WU_lOLo7eN/Package-Stash-0.38.tar.gz requires (x_Dist_Zilla): inc::MMPackageStash~0 in /Users/jhannah/.cache/pintolib/lib/perl5/Pinto/PackageExtractor.pm at line 122

I don't understand where inc::MMPackageStash is coming from.

hartzell commented 5 years ago

Once source of these errors is the change (sometime around 5.26?) that took . off of @INC.

Distro's that stash their own little bits (often Module::Install based) worked because they have an inc/ dir that was automagically on the path. Post-5.26, that directory's no longer discoverable without extra work.

jhannah commented 5 years ago

@hartzell OH!! So the problem is https://metacpan.org/source/ETHER/Package-Stash-0.38/inc/MMPackageStash.pm ? umm... Does Pinto need to change to understand this?

hartzell commented 5 years ago

I think that Pinto's out to pasture, change there is gonna be hard....

I've run into it with distro's that weren't in a Pinto repository and "fixed" it by making sure that I had $(pwd) on my @INC before doing cpan [...] MyDistro-x.y.z.tar.gz.

You can probably work around it for now with PERL_USE_UNSAFE_INC, details here. Alternatively, use 5.24.x?

I'd argue that it's a bug in Package::Stash.

tomaszmarcinkowski-evry commented 3 years ago

The error message was misleading. When pinto pulls packages it pulls each possible dependency found in those packages. And the message was given because the module inc::MMPackageStash is a submodule of Package::Stash contained in the same package (it has no own package).

JaSei commented 3 years ago

Hi, I tried to use PERL_USE_UNSAFE_INC=1 or perl 5.24.x (both in docker) and still Cannot find inc::MMPackageStash~0 anywhere

it looks like -k inc::MMPackageStash is an only once possibility