Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Offline cpan used by strawberry perl

by Dirk80 (Pilgrim)
on Jan 31, 2020 at 15:06 UTC ( [id://11112182]=note: print w/replies, xml ) Need Help??


in reply to Re: Offline cpan used by strawberry perl
in thread Offline cpan used by strawberry perl

Yes, I now tried to use o conf. But my problem remains. If the 01mailrc.txt.gz has an older date than today, it tries to fetch it via LWP. And this fails. And I want always to use my offline-cpan archive independent of having a connection to internet or not.

Here the errors:

cpan> install Text::Trim Could not find 'D:\Perl\strawberry\cpan\sources\authors\01mailrc.txt.g +z' Fetching with LWP: file:///D:/Perl/strawberry/cpan/sources/authors/01mailrc.txt.gz LWP failed with code[404] message[File `D:\Perl\strawberry\cpan\source +s\authors\01mailrc.txt.gz' does not exist] Could not find 'D:\Perl\strawberry\cpan\sources\authors\01mailrc.txt.g +z'

But the file exists. It just has a date of 27th of January instead of today. Cpan then renames my local file to e.g. 01mailrc.txt.gz.bak4400.

Here my configuration:

cpan> o conf $CPAN::Config options from D:\Perl\strawberry\perl\lib/CPAN/Config.pm: commit [Commit changes to disk] defaults [Reload defaults from disk] help [Short help about 'o conf' usage] init [Interactive setting of all options] allow_installing_module_downgrades undef allow_installing_outdated_dists undef applypatch [] auto_commit [1] build_cache [50] build_dir [D:\Perl\strawberry\cpan\build] build_dir_reuse [0] build_requires_install_policy [yes] bzip2 [ ] cache_metadata [1] check_sigs [0] cleanup_after_install undef colorize_debug undef colorize_output [0] colorize_print [bold green] colorize_warn [bold red] commandnumber_in_prompt [0] commands_quote undef connect_to_internet_ok [1] cpan_home [D:\Perl\strawberry\cpan] curl [] dontload_hash undef dontload_list undef ftp [] ftp_passive [1] ftp_proxy [] ftpstats_period undef ftpstats_size undef getcwd [cwd] gpg [] gzip [ ] halt_on_failure [1] histfile [D:\Perl\strawberry\cpan\histfile] histsize [1000] http_proxy [] inactivity_timeout [0] index_expire [1] inhibit_startup_message [0] keep_source_where [D:\Perl\strawberry\cpan\sources] load_module_verbosity [none] lynx [] make [D:\Perl\strawberry\c\bin\gmake.exe] make_arg [] make_install_arg [UNINST=1] make_install_make_command [D:\Perl\strawberry\c\bin\gmake.exe] makepl_arg [] mbuild_arg [] mbuild_install_arg [--uninst 1] mbuild_install_build_command undef mbuildpl_arg [] ncftp [] ncftpget [] no_proxy [] pager [C:\Windows\system32\more.COM] password undef patch [D:\Perl\strawberry\c\bin\patch.exe] patches_dir undef perl5lib_verbosity [none] plugin_list undef prefer_external_tar [0] prefer_installer [MB] prefs_dir [D:\Perl\strawberry\cpan\prefs] prerequisites_policy [follow] proxy_pass undef proxy_user undef randomize_urllist undef recommends_policy [1] scan_cache [atstart] shell [C:\Windows\system32\cmd.exe] show_unparsable_versions [0] show_upload_date [1] show_zero_versions [0] suggests_policy [0] tar [ ] tar_verbosity [none] term_is_latin [1] term_ornaments [1] test_report [0] trust_test_report_history [0] unzip [] urllist 0 [file:///D:/Perl/strawberry/cpan/sources/] 1 [http://cpan.strawberryperl.com/] 2 [http://www.cpan.org/] urllist_ping_external undef urllist_ping_verbose undef use_prompt_default [0] use_sqlite [1] username undef version_timeout [15] wait_list undef wget [] yaml_load_code [0] yaml_module [YAML::XS]

Replies are listed 'Best First'.
Re^3: Offline cpan used by strawberry perl
by Anonymous Monk on Jan 31, 2020 at 23:57 UTC

    Trim your urllist ?

    And/or

    Tickle this value

    index_expire [1] index_expire refetch index files after this many days

    CPANPLUS doesn't have a days, only a yes/no no_update

      Without being able to test it until monday. I'm very sure that setting the index_expire option to a high value is the solution. Because my problem were the index files. And it worked on the same day, but not afterwards. My setting was one day. This explains the complete behaviour although I have to say that the error message given by cpan was a bit misleading. Instead of saying that the index file expired, it tells me that it is not available.

      Here a summary, because at the end it does not seem to be much to do. First get a cpan via minicpan. Then add your local path to the urllist and set index_expire to a high value. That should be everything.

      cpan> o conf urllist unshift file://D:/Perl/strawberry/cpan/sources/ cpan> o conf index_expire 1000 cpan> o conf commit
      Update

      It was that easy. Setting the index_expire to a high value solved the problem. Thank you!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11112182]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-03-28 18:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found