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

Failed to open file /home/zoffix/.zef/store/cpan/packages.json: no such file or directory #102

Closed
zoffixznet opened this issue Sep 8, 2016 · 2 comments

Comments

@zoffixznet
Copy link
Contributor

zoffixznet commented Sep 8, 2016

I have this alias to update Perl 6, which I've just run.

zoffix@leliana:/tmp/tmp.hVkdJkaXlr$ type update-perl6 
update-perl6 is aliased to `rm -fr ~/.perl6; rm -fr ~/.rakudobrew/; git clone https://github.com/tadzik/rakudobrew ~/.rakudobrew; rakudobrew build moar; rakudobrew build zef;'

And now zef fails to install modules. I see this recent commit mentions adding cpan support and the unfound file is has cpan in the name, so maybe that's the suspect.

zoffix@leliana:/tmp/tmp.hVkdJkaXlr$ zef install HTTP::Client
===> Searching for: HTTP::Client
Failed to open file /home/zoffix/.zef/store/cpan/packages.json: no such file or directory
  in any  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm line 1
  in method slurp-package-list at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/F9AFEBDFA35D22BCCF53CDB4667B5C8E843F7754 (Zef::ContentStorage::Ecosystems) line 41
  in method gather-dists at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/F9AFEBDFA35D22BCCF53CDB4667B5C8E843F7754 (Zef::ContentStorage::Ecosystems) line 16
  in code  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/F9AFEBDFA35D22BCCF53CDB4667B5C8E843F7754 (Zef::ContentStorage::Ecosystems) line 62
  in code  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/D0ED6B6C5F63C73D69154AE10269F88F8F9E97A3 (Zef::ContentStorage) line 15
  in method candidates at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/D0ED6B6C5F63C73D69154AE10269F88F8F9E97A3 (Zef::ContentStorage) line 12
  in method find-candidates at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/1DC0BAA246D0774E7EB4F5119C6168E0D8266EFA (Zef::Client) line 90
  in method find-candidates at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/1DC0BAA246D0774E7EB4F5119C6168E0D8266EFA (Zef::Client) line 77
  in sub MAIN at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/A9948E7371E0EB9AFDF1EEEB07B52A1B75537C31 (Zef::CLI) line 100
  in block <unit> at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E line 1

Actually thrown at:
  in any  at gen/moar/m-Metamodel.nqp line 3090
  in method slurp-package-list at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/F9AFEBDFA35D22BCCF53CDB4667B5C8E843F7754 (Zef::ContentStorage::Ecosystems) line 41
  in method gather-dists at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/F9AFEBDFA35D22BCCF53CDB4667B5C8E843F7754 (Zef::ContentStorage::Ecosystems) line 16
  in code  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/F9AFEBDFA35D22BCCF53CDB4667B5C8E843F7754 (Zef::ContentStorage::Ecosystems) line 62
  in code  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/D0ED6B6C5F63C73D69154AE10269F88F8F9E97A3 (Zef::ContentStorage) line 15
  in method candidates at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/D0ED6B6C5F63C73D69154AE10269F88F8F9E97A3 (Zef::ContentStorage) line 12
  in method find-candidates at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/1DC0BAA246D0774E7EB4F5119C6168E0D8266EFA (Zef::Client) line 90
  in method find-candidates at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/1DC0BAA246D0774E7EB4F5119C6168E0D8266EFA (Zef::Client) line 77
  in sub MAIN at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/A9948E7371E0EB9AFDF1EEEB07B52A1B75537C31 (Zef::CLI) line 100
  in block <unit> at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E line 1

zoffix@leliana:/tmp/tmp.hVkdJkaXlr$ less /home/zoffix/.zef/store/cpan/packages.json
/home/zoffix/.zef/store/cpan/packages.json: No such file or directory

Doing this appears to fix the issue:

echo '{}' > /home/zoffix/.zef/store/cpan/packages.json
@ugexe
Copy link
Owner

ugexe commented Sep 8, 2016

Hmmm, first I left cpan enabled in the config by default. This has been corrected.

Not sure why it failed to fetch the cpan meta data file cpan.json and copy to cpan/packages.json though. This appears to fix it: 105bc8c

I'd be be curious to see if your output from zef --debug --/p6c --cpan install HTTP::Client if that command fails. It means I can probably narrow it down to a difference in plugins chosen to execute phases

Also odd is that travis did not have this problem for that cpan commit: https://travis-ci.org/ugexe/zef/jobs/158057547#L1172 even though I was able to reproduce your errors by following your steps exactly

@zoffixznet
Copy link
Contributor Author

I ran my update-perl6 alias again and everything installed fine.

Here's the output of the command, if it helps (I ran this on one box and just plain zef install HTTP::Client on another box and both worked fine)

zoffix@b-webdev-dt:~$ zef --debug --/p6c --cpan install HTTP::Client
===> Searching for: HTTP::Client
===> Found: HTTP::Client
===> Dependencies: MIME::Base64, HTTP::Status
===> Searching for missing dependencies: MIME::Base64, HTTP::Status
===> Found dependencies: MIME::Base64:ver('1.2'):auth('github:retupmoca'), HTTP::Status
===> Filtering: HTTP::Client
===> Filtering [OK] for HTTP::Client
===> Filtering: MIME::Base64:ver('1.2'):auth('github:retupmoca')
===> Filtering [OK] for MIME::Base64:ver('1.2'):auth('github:retupmoca')
===> Filtering: HTTP::Status
===> Filtering [OK] for HTTP::Status
===> # SKIP: No Build.pm for MIME::Base64:ver('1.2'):auth('github:retupmoca')
===> # SKIP: No Build.pm for HTTP::Status
===> # SKIP: No Build.pm for HTTP::Client
===> Testing: MIME::Base64:ver('1.2'):auth('github:retupmoca')
Testing with plugin: Zef::Service::Shell::prove+{<anon|192230000>}
t/basic.t ................. ok
t/binary-and-long-line.t .. ok
t/oneline.t ............... ok
t/rfc4648-test-vector.t ... ok
All tests successful.
Files=4, Tests=47,  6 wallclock secs ( 0.07 usr  0.01 sys +  5.04 cusr  0.49 csys =  5.61 CPU)
Result: PASS
===> Testing [OK] for MIME::Base64:ver('1.2'):auth('github:retupmoca')
===> Testing: HTTP::Status
Testing with plugin: Zef::Service::Shell::prove+{<anon|192230000>}
t/01-basic.t ..... ok
t/02-is-tests.t .. ok
All tests successful.
Files=2, Tests=46,  2 wallclock secs ( 0.05 usr  0.02 sys +  2.13 cusr  0.25 csys =  2.45 CPU)
Result: PASS
===> Testing [OK] for HTTP::Status
===> Testing: HTTP::Client
Testing with plugin: Zef::Service::Shell::prove+{<anon|192230000>}
t/01-get.t ............. ok
t/02-post.t ............ ok
t/03-post-multipart.t .. ok
All tests successful.
Files=3, Tests=16, 11 wallclock secs ( 0.06 usr  0.01 sys +  7.64 cusr  0.63 csys =  8.34 CPU)
Result: PASS
===> Testing [OK] for HTTP::Client
===> Installing: MIME::Base64:ver('1.2'):auth('github:retupmoca')
===> Install [OK] for MIME::Base64:ver('1.2'):auth('github:retupmoca')
===> Installing: HTTP::Status
===> Install [OK] for HTTP::Status
===> Installing: HTTP::Client
===> Install [OK] for HTTP::Client
zoffix@b-webdev-dt:~$ 

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

2 participants