You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm closing in on the end of our custom DarkPAN solution using cpm (which I talked about in #138). I know this is not exactly what you designed cpm to do, but it really is almost perfect for how I'm using it. There's just one last niggling detail. :-)
This is a very similar problem to #140, actually. I'm not worried about proper core modules so much as the "dual-life" ones. So here's the issue:
In my cpanfile, I don't put exact version numbers for (most) modules. Exact version numbers go in my
cpanfile.snapshot, which of course has exact version numbers for everything. I use --resolver snapshot to tell cpm to use the snapshot file to figure out the proper version number. This works great as long as the module is not installed.
However, when the module is installed, then we have a problem. Because App::cpm::Master::is_installed is called after the cpanfile is read, but before the snapshot is read. Therefore, the module has a version_range of 0 (i.e. not specified), and there is a version installed, and that's deemed good enough.
Of course, if the snapshot file were to be consulted, it would say the version is insufficient. :-(
I can get around the worst problems here by using the (undocumented) --exclude-vendor switch; that at least limits the real problems to the dual-life modules. But App::Prove is an excellent example: it was made core in 5.10.1, but I can easily install an upgraded version if I like (and I do like). And I can put the desired version in my snapshot. But that doesn't matter to cpm because it never checks the snapshot, because by the time the snapshot comes around it's already decided it needn't bother.
Note that it's only when using the cpanfile that I have this problem. If I just tell cpm to install App::Prove directly, it goes ahead and installs the latest version.
I might be able to fix this in a hacky way by excluding $Config{privlibexp} in App::cpm::CLI::_inc (the same place where --exclude-vendor is implemented); obviously trying to exclude $Config{archlibexp} is just going to get me in trouble by trying to install things which are only available by installing perl itself. And, hell: privlibexp might have some of that too. But it might be worth a try if there doesn't seem to be any other option. But I'm soooo close here that I thought I'd run it by you and see if you had any thoughts on how to address this issue.
As always, thanks so much for cpm. It really is changing the way I install Perl modules.
The text was updated successfully, but these errors were encountered:
Were there any thoughts on this? I do think that having something like this would go a long way towards making cpm the perfect solution for private CPAN/DarkPAN solutions. I'm also wondering if cpanm would do this if using its --self-contained switch ... I suspect it would, since (as I mentioned above) doing cpm App::Provedoes install the updated version. It's just not picking up from the snapshot that it needs an update.
Reviewing my open tickets here, I can see that this issue is just a subset of #198. So I think having that one open is sufficient; I'm closing this one.
I'm closing in on the end of our custom DarkPAN solution using
cpm
(which I talked about in #138). I know this is not exactly what you designedcpm
to do, but it really is almost perfect for how I'm using it. There's just one last niggling detail. :-)This is a very similar problem to #140, actually. I'm not worried about proper core modules so much as the "dual-life" ones. So here's the issue:
cpanfile
, I don't put exact version numbers for (most) modules. Exact version numbers go in mycpanfile.snapshot
, which of course has exact version numbers for everything. I use--resolver snapshot
to tellcpm
to use the snapshot file to figure out the proper version number. This works great as long as the module is not installed.App::cpm::Master::is_installed
is called after thecpanfile
is read, but before the snapshot is read. Therefore, the module has aversion_range
of 0 (i.e. not specified), and there is a version installed, and that's deemed good enough.I can get around the worst problems here by using the (undocumented)
--exclude-vendor
switch; that at least limits the real problems to the dual-life modules. ButApp::Prove
is an excellent example: it was made core in 5.10.1, but I can easily install an upgraded version if I like (and I do like). And I can put the desired version in my snapshot. But that doesn't matter tocpm
because it never checks the snapshot, because by the time the snapshot comes around it's already decided it needn't bother.Note that it's only when using the
cpanfile
that I have this problem. If I just tellcpm
to installApp::Prove
directly, it goes ahead and installs the latest version.I might be able to fix this in a hacky way by excluding
$Config{privlibexp}
inApp::cpm::CLI::_inc
(the same place where--exclude-vendor
is implemented); obviously trying to exclude$Config{archlibexp}
is just going to get me in trouble by trying to install things which are only available by installingperl
itself. And, hell:privlibexp
might have some of that too. But it might be worth a try if there doesn't seem to be any other option. But I'm soooo close here that I thought I'd run it by you and see if you had any thoughts on how to address this issue.As always, thanks so much for
cpm
. It really is changing the way I install Perl modules.The text was updated successfully, but these errors were encountered: