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

wip: Fall back to CPAN by default. #55 #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

miyagawa
Copy link
Owner

@miyagawa miyagawa commented Jun 1, 2022

Change the default behavior (configuration option to be added later) to fallback to CPAN if the module doesn't exist in the custom mirror.

TODO:

  • this breaks mirror.t where you run carmel install for the first time (without snapshot) with a custom mirror, you expect to pull the version if it exists in the mirror, but the current implementation pulls the latest from CPAN.

@miyagawa
Copy link
Owner Author

miyagawa commented Jun 1, 2022

When you have HTTP-Tiny-0.078.tar.gz in your mirror index:

➜  cpanm --mirror file://$PWD/vendor/cache --info HTTP::Tiny -v 
cpanm (App::cpanminus) 1.7046 on perl 5.034001 built for darwin-2level
Work directory is /Users/miyagawa/.cpanm/work/1654067874.5707
You have make /usr/bin/make
You have LWP 6.66
You have /usr/bin/tar: bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8 
You have /usr/bin/unzip
Searching HTTP::Tiny () on cpanmetadb ...
DAGOLDEN/HTTP-Tiny-0.080.tar.gz
➜  cpanm -M file://$PWD/vendor/cache --info HTTP::Tiny -v       
cpanm (App::cpanminus) 1.7046 on perl 5.034001 built for darwin-2level
Work directory is /Users/miyagawa/.cpanm/work/1654067884.5742
You have make /usr/bin/make
You have LWP 6.66
You have /usr/bin/tar: bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8 
You have /usr/bin/unzip
Searching HTTP::Tiny on mirror file:///tmp/scratch/vendor/cache ...
Downloading index file file:///tmp/scratch/vendor/cache/modules/02packages.details.txt.gz ...
DAGOLDEN/HTTP-Tiny-0.078.tar.gz

We need --mirror-only (-M) to stop searching for CPAN but that's exactly what this PR disables.

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

Successfully merging this pull request may close these issues.

1 participant