thaljef / Pinto

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

Unable to install from stack using remote pintod server #238

Closed expandstudios closed 7 years ago

expandstudios commented 7 years ago

Hello, we are trying to setup Pinto as our private package repo and need to utilise stacks for various reasons.

Unfortunately I am unable to install from the non-default stack via the pintod server.

Stack clearly shows it has the module:

$ pinto list -s YBI2-Script-Make
...
[rl-] YBI2::Script::CLI                                   0 RJOHNSONBADE/YBI2-Script-Make-0.0.19.tar.gz
[rl-] YBI2::Script::Make                            v0.0.19 RJOHNSONBADE/YBI2-Script-Make-0.0.19.tar.gz
[rl-] YBI2::Script::Make::CLI::Build                      0 RJOHNSONBADE/YBI2-Script-Make-0.0.19.tar.gz
[rl-] YBI2::Script::Make::CLI::Clean                      0 RJOHNSONBADE/YBI2-Script-Make-0.0.19.tar.gz
[rl-] YBI2::Script::Make::CLI::Dist                       0 RJOHNSONBADE/YBI2-Script-Make-0.0.19.tar.gz
[rl-] YBI2::Script::Make::CLI::Meta                       0 RJOHNSONBADE/YBI2-Script-Make-0.0.19.tar.gz
[rl-] YBI2::Script::Make::CLI::New                        0 RJOHNSONBADE/YBI2-Script-Make-0.0.19.tar.gz
[rl-] YBI2::Script::Make::CLI::Publish                    0 RJOHNSONBADE/YBI2-Script-Make-0.0.19.tar.gz
[rl-] YBI2::Script::Make::CLI::Release                    0 RJOHNSONBADE/YBI2-Script-Make-0.0.19.tar.gz
[rl-] YBI2::Script::Make::CLI::Test                       0 RJOHNSONBADE/YBI2-Script-Make-0.0.19.tar.gz
[rl-] YBI2::Script::Make::Minilla::Profile::YBIMake            0 RJOHNSONBADE/YBI2-Script-Make-0.0.19.tar.gz
...

But it fails to install

$ pinto install -s YBI2-Script-Make YBI2::Script::Make
! cannot open file '/Users/xxxxxxx/.cpanm/sources/http%cpan.local.yesbookit.com%stacks%YBI2-Script-Make/02packages.details.txt.gz': No such file or directory opening compressed index
! Couldn't find module or a distribution YBI2::Script::Make

Installing from default stack works no problem.

thaljef commented 7 years ago

The path to the 02packages looks suspicious. I think it should be

http://cpan.local.yesbookit.com/stacks/YBI2-Script-Make/modules/02packages.details.txt.gz

Can you try and fetching that with curl to see if I'm right.

And can you tell me which version of Pinto, Pinto::Server, and cpanm you are using. Thanks.

expandstudios commented 7 years ago

Ahhh found the culprit, the stack I was trying to reference had already been created but with different case.

This failed:

$ curl "http://cpan.local.yesbookit.com/stacks/YBI2-Script-Make/modules/02packages.details.txt.gz"
File /pinto-repository/stacks/YBI2-Script-Make/modules/02packages.details.txt.gz not found

So I checked the repo folder

$ ls -l stacks/
drwxr-xr-x. 3 root root 34 Mar  6 16:46 master
drwxr-xr-x. 3 root root 34 Mar  6 17:09 ybi2-script-make
drwxr-xr-x. 3 root root 34 Mar  7 17:31 YBI2-Test-Project
drwxr-xr-x. 3 root root 34 Mar  7 11:17 YBI-TestPackage

And you can see ybi2-script-make there. When I tried to pinto now YBI2-Script-Make it said it already exists but when I tried to reference it using that capitalization it failed.

Thanks for the help :) (and the software)

thaljef commented 7 years ago

Glad it worked out. And thanks for giving Pinto a try.