简体   繁体   English

如何从minicpan存储库中排除模块?

[英]How can I exclude a module from a minicpan repository?

I have a local MINICPAN repository, but I want to remove a specific version of a module, and inject an older version. 我有一个本地MINICPAN存储库,但我想删除一个特定版本的模块,并注入一个旧版本。

This is the steps I've taken. 这是我采取的步骤。

- create the MINICPAN, not filtering any modules
- use mcpani --add for the module in question
- use mcpani --inject

At this point, I can see in the MINICPAN that it has both the version I want, and the newer version, if I issue install in cpan, then the newer version of the module is install. 此时,我可以在MINICPAN中看到它同时具有我想要的版本和更新的版本,如果我在cpan中发出install,那么该模块的较新版本就是install。 How can I get rid of the newer version from my minicpan? 如何从我的minicpan中删除新版本?

Filter the modules that you are going to inject. 过滤要注入的模块。 The CPAN::Mini has the documentation for filtering, and I think I had some examples in the resources I pointed you toward earlier. CPAN :: Mini有过滤的文档,我想我在前面提到的资源中有一些例子。 :) :)

If you already have the minicpan, as you said in the comment to ysth, you can create another minicpan from that one. 如果您已经拥有了minicpan,正如您在ysth的评论中所说的那样,您可以创建另一个 minicpan。 The "remote" CPAN in that case is the one that you have. 在这种情况下,“远程”CPAN就是您拥有的CPAN。 I do that all the time: I have a canonical minicpan, but then for testing things, I filter from that to create new repositories just so I don't have to deal with the network. 我一直这样做:我有一个规范的minicpan,然后为了测试的东西,我从那里过滤来创建新的存储库,所以我不必处理网络。

不过滤模块最初工作?

Another strategy would be to use Pinto . 另一种策略是使用Pinto Unlike a minicpan, a Pinto repository contains only the distributions you want (and their dependencies), so there is no need for filtering. 与minicpan不同,Pinto存储库包含您需要的发行版(及其依赖项),因此不需要进行过滤。 This results in a much smaller and more manageable pile of files, so you can easily do things like check it into your SCM. 这样可以生成更小,更易于管理的文件堆,因此您可以轻松地将其检查到SCM中。 Pinto also has some neat tools for handling upgrades without accidentally breaking your application. Pinto还有一些简洁的工具来处理升级,而不会意外地破坏您的应用程序。

Also, Stratopan hosts Pinto repositories in the cloud. 此外, Stratopan在云中托管Pinto存储库。 You can manage the repository through your browser and install modules anywhere that has internet access. 您可以通过浏览器管理存储库,并在任何可以访问Internet的地方安装模块。 It doesn't yet support all the features Pinto has, but Stratopan really takes the hassle out of maintaining a local CPAN. 它还没有支持Pinto的所有功能,但Stratopan真的很难避免维护本地CPAN。

Disclaimer: I operate Stratopan. 免责声明:我经营Stratopan。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM