Is it possible to add multiple versions of a module to a minicpan index?

空扰寡人 提交于 2019-12-12 19:25:34

问题


I'm setting up a CPAN::Mini mirror and I want to be able to download multiple versions of modules from the mirror. How do I get it to index more that the latest version of modules I inject:

$ mcpani -v --add --module Foo --authorid DUMMY --modversion 0.001 --file Foo/Foo-0.001.tar.gz
$ mcpani -v --add --module Foo --authorid DUMMY --modversion 0.002 --file Foo/Foo-0.002.tar.gz
$ mcpani -v --update

such that I can do:

$ cpanm -M ~/CPAN Foo@0.001

NOTE:

The different versions of the module are present within the mirror:

$ find ~/CPAN -name 'Foo-0.00[12].tar.gz'
~/CPAN/authors/id/D/DU/DUMMY/Foo-0.001.tar.gz
~/CPAN/authors/id/D/DU/DUMMY/Foo-0.002.tar.gz

Even if I edit the index file by hand, only the first one listed is available for download:

$ zgrep '^Foo\s' ~/CPAN/modules/02packages.details.txt.gz 
Foo                               0.002  D/DU/DUMMY/Foo-0.002.tar.gz
Foo                               0.001  D/DU/DUMMY/Foo-0.001.tar.gz

I have used CPAN::Mini::Inject in my examples here but I have tried the following with the same outcome:

  • cpansite
  • App::opan
  • OrePAN2

来源:https://stackoverflow.com/questions/54768605/is-it-possible-to-add-multiple-versions-of-a-module-to-a-minicpan-index

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!