-
Notifications
You must be signed in to change notification settings - Fork 97
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
allow cpanm options to be set via PERL_CARTON_CPANM_OPT #199
base: master
Are you sure you want to change the base?
Conversation
I'm using this to define dependencies that are hosted on a local mirror rather than CPAN by setting PERL_CARTON_CPANM_OPT="--mirror $HOME/minicpan", this pr seems to work well for this use case so thanks :) |
Mirrorm can be set via PERL_CARTON_MIRROR.
|
@miyagawa, is there a canonical way to deal with configure timeouts too? |
@miyagawa sorry I simplified my case for the purposes of explanation, I'm actually setting a number of mirrors with this, using PERL_CARTON_CPANM_OPT="--mirror $HOME/minicpan --mirror https://cpan.metacpan.org --mirror-only" from what I can see from the code PERL_CARTON_MIRROR will only let you set one mirror. |
@miyagawa, any thoughts on all this? |
@miyagawa I could also use this. |
Same here - I could do with this. Cannot install Memcached::libmemcached (unless I do it manually with cpanm) |
A year later and no action. Any reason why not, @miyagawa? |
Overriding cpanm's options would make the carton' behavior inconsistent - you can totally screw up its mirror provider capabilities by specifying invalid mirror options. I understand there's a need to override it, but this isn't the ideal approach. If you know what you're doing, it's fine you patch Carton with this one. |
@miyagawa I trust completely your judgement that this can totally screw things up, but what would the ideal approach be? Even if the ideal approach is too much work could this not be merged and documented with a liberal sprinkling of capital and bold lettering to make it clear that you should only set this environment variable if you know what you're doing? As I might have mentioned before I contribute to a distro that uses carton quite heavily in one of its tools and so we have to maintain our own fork of carton just to get this patch, which is a bit sad for us :( But anyway thanks for making this tool in the first place, it's completely awesome! :D |
the ideal way would be to allow specific options via either command line options or via cpanfile specification. in Carmel I added an ability to specify mirrors using cpanfile's you're right that it would take a lot of efforts, and overriding via the environment is an easy way to deal with it. |
btw i'd like all of you to try out Carmel https://github.com/miyagawa/Carmel and let me know how it works. The interface is almost exactly the same as Carton, but it is implemented in a completely different way. There's a compatibility with carton if you keep the |
Would you accept a patch that is more targeted in allowing |
I honestly don't understand why this is not being followed up upon. Being able to pass arguments to cpanm is actually not introducing inconsistency, but enabling consistency of using a single tool across multiple platforms. The sad story is, if this is not being enabled, that every Developer that wants to use carton on OSX these days, needs to fork it and patch it to continue using the same tool. This goes away from the initial use case of passing a TIMEOUT to cpanm, but mine feels just a bit bigger, I support even passing timeouts to cpanm/carton. |
I ran across this GitHub issue trying to solve for a similar problem with Net-DNS not building right because of a configure timeout. The solution provided at the start of this ticket looked like something easy to put into our And then I realized that vanilla Carton doesn't have this option. Our company-patched 1.0.12 version does. We also have So, I'm a bit disheartened that this PR is essentially being denied for architectural reasons, especially when a new (experimental) app is being pushed as the new hotness. If Carmel is the new replacement with a better design approach, let us have slightly imperfect solutions that work for the older app. We will likely continue to use Carton in the near future until we have a (non-experimental) app to switch to, and an excuse to do so. We would be happy to share our patches, but I see little point if they aren't going to actually be accepted into the main Carton repo. |
Allows common folk to shoot themselves in the foot, in addition to solving problems such as #139 without source modifications.
Not being able to set any
cpanm
options prevents us from usingMemcached::libmemcached
since our build server is not beefy enough to compile the whole thing in under 60s. This patch gives us a way out by allowing